[wp-trac] [WordPress Trac] #30292: Stop get_post() overwriting non-WP_Post objects passed as first parameter

WordPress Trac noreply at wordpress.org
Wed Oct 14 07:26:03 UTC 2015


#30292: Stop get_post() overwriting non-WP_Post objects passed as first parameter
------------------------------------------------+--------------------------
 Reporter:  MikeSchinkel                        |       Owner:
     Type:  enhancement                         |      Status:  new
 Priority:  normal                              |   Milestone:  Awaiting
Component:  Posts, Post Types                   |  Review
 Severity:  normal                              |     Version:  3.5
 Keywords:  has-patch dev-feedback 2nd-opinion  |  Resolution:
                                                |     Focuses:
------------------------------------------------+--------------------------

Comment (by MikeSchinkel):

 Decided to update patch to also pass `$post` because if passed to
 `get_post()` it would be important for the `'do_get_post'` hook to have
 access to it.

 Also added a `@return` value to the PHPDoc thus contradicting myself.
 ''(Doh!)''

--
Ticket URL: <https://core.trac.wordpress.org/ticket/30292#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list