[wp-trac] [WordPress Trac] #22883: get_page_uri() can produce PHP Warnings when non-WP_Post object instances are passed

WordPress Trac noreply at wordpress.org
Thu Dec 27 15:27:12 UTC 2012


#22883: get_page_uri() can produce PHP Warnings when non-WP_Post object instances
are passed
-----------------------------------------------+---------------------
 Reporter:  dd32                               |       Owner:  nacin
     Type:  defect (bug)                       |      Status:  closed
 Priority:  normal                             |   Milestone:  3.5.1
Component:  General                            |     Version:  3.5
 Severity:  normal                             |  Resolution:  fixed
 Keywords:  has-patch commit needs-unit-tests  |
-----------------------------------------------+---------------------

Comment (by nacin):

 In [changeset:"23209"]:
 {{{
 #!CommitTicketReference repository="" revision="23209"
 Always call get_post() in get_page_uri() to ensure we have a WP_Post
 object, which lazy-loads the ancestors this function requires.

 Merges [23208] to the 3.5 branch.
 props dd32.
 fixes #22883.
 }}}

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/22883#comment:9>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list