[wp-trac] [WordPress Trac] #24548: _wp_menu_item_classes_by_context assumes $queried_object->ancestors is an array

WordPress Trac noreply at wordpress.org
Sat Oct 25 18:14:26 UTC 2014


#24548: _wp_menu_item_classes_by_context assumes $queried_object->ancestors is an
array
------------------------------------+------------------------------
 Reporter:  wpsmith                 |       Owner:
     Type:  defect (bug)            |      Status:  new
 Priority:  normal                  |   Milestone:  Awaiting Review
Component:  Menus                   |     Version:
 Severity:  normal                  |  Resolution:
 Keywords:  has-patch dev-feedback  |     Focuses:
------------------------------------+------------------------------
Changes (by wpsmith):

 * keywords:  has-patch reporter-feedback => has-patch dev-feedback


Comment:

 Replying to [comment:2 nacin]:
 > When are either of these not arrays?

 In `WP_Query::get_queried_object()` it is initialized as null:
 `$this->queried_object = null;` in wp-includes/query.php.

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


More information about the wp-trac mailing list