[wp-trac] [WordPress Trac] #29660: Functions in wp_includes/query.php assume non-null return value from get_queried_object

WordPress Trac noreply at wordpress.org
Tue May 10 22:10:44 UTC 2016


#29660: Functions in wp_includes/query.php assume non-null return value from
get_queried_object
--------------------------+-----------------------------
 Reporter:  yellyc        |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Future Release
Component:  Query         |     Version:  4.0
 Severity:  normal        |  Resolution:
 Keywords:  2nd-opinion   |     Focuses:
--------------------------+-----------------------------

Comment (by Howdy_McGee):

 In the same light here's some other ways to trigger the `is_page()` query
 errors. The deeper issue has already been pointed out by boonebgorges in
 #comment8 that WP is looking for non-existent feeds and is_front_page()
 returns errors:

 1) Assign a Front page
 2) Create and Publish a new page
 3) Change / Update the page slug and visit `/old-slug/feed/`

 Alternatively, if you trash the page and visit the trashed slug `/page-
 slug/feed/` you will also trigger the errors:


 {{{
 Notice: Trying to get property of non-object in /wp-includes/query.php on
 line 4520
 Notice: Trying to get property of non-object in /wp-includes/query.php on
 line 4522
 Notice: Trying to get property of non-object in /wp-includes/query.php on
 line 4524
 }}}

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


More information about the wp-trac mailing list