[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:26:06 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  |
-----------------------------------------------+---------------------
Changes (by nacin):

 * owner:   => nacin
 * status:  new => closed
 * resolution:   => fixed


Comment:

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

 props dd32
 fixes #22883
 Unit tests: [1175/tests]
 }}}

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


More information about the wp-trac mailing list