[wp-trac] [WordPress Trac] #17670: PHP Notices from get_page_by_path() (was: PHP Notices when Attachment is accessed via wrong url via pagerewrite)

WordPress Trac wp-trac at lists.automattic.com
Sat Sep 3 11:41:49 UTC 2011


#17670: PHP Notices from get_page_by_path()
------------------------------+------------------
 Reporter:  dd32              |       Owner:
     Type:  defect (bug)      |      Status:  new
 Priority:  normal            |   Milestone:  3.3
Component:  Warnings/Notices  |     Version:  3.1
 Severity:  normal            |  Resolution:
 Keywords:  has-patch         |
------------------------------+------------------
Description changed by dd32:

Old description:

> Example:
>
> {{{
> Expected url: /2008/06/10/post-format-test-gallery/canola2/
> Accessed url: /canola2/
> }}}
>
> get_page_by_path() will result in these 2 warnings:
> {{{
> NOTICE: wp-includes\post.php:3167 - Trying to get property of non-object
> NOTICE: wp-includes\post.php:3162 - Trying to get property of non-object
> }}}

New description:

 Example of accessing an Image through it's not post url:

 {{{
 Expected url: /2008/06/10/post-format-test-gallery/canola2/
 Accessed url: /canola2/
 }}}

 get_page_by_path() will result in these 2 warnings:
 {{{
 NOTICE: wp-includes\post.php:3167 - Trying to get property of non-object
 NOTICE: wp-includes\post.php:3162 - Trying to get property of non-object
 }}}

 Similar warnings are now emmited by trunk when accessing child pages as
 well

--

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


More information about the wp-trac mailing list