[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
Sat Sep 13 13:49:51 UTC 2014


#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:  Awaiting Review
Component:  Query         |    Version:  4.0
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 There are several functions in wp_includes/query.php that use
 get_quried_object and assume non-null return values, namely:
 * is_attachment
 * is_author
 * is_category
 * is_tag
 * is_tax
 * is_page
 * is_single
 * is_singular
 This oversight can result in frequent "Trying to get property of non-
 object" errors.

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


More information about the wp-trac mailing list