[wp-trac] [WordPress Trac] #17670: PHP Notices from get_page_by_path()
WordPress Trac
wp-trac at lists.automattic.com
Tue Sep 13 17:17:54 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 |
------------------------------+------------------
Comment (by duck_):
There is an issue with 17670.5.diff. If the URL being visited only has one
part, e.g. /page-slug, and there are 2+ pages that match that slug but are
in different trees then the wrong page could be displayed as the the loop
within `1 == $revparts_count` doesn't check that `$page->post_parent ==
0`.
I've attached 17670.6.diff which is my take on fixing the issues. I
haven't attempted a load of optimisation as I think that should be dealt
with separately -- fix the notices and other issues first.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/17670#comment:10>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list