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

WordPress Trac noreply at wordpress.org
Sun Jun 9 19:08:16 UTC 2013


#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        |   Keywords:  has-patch dev-feedback
--------------------------+------------------------------------
 Recently, on a site using [http://wordpress.org/plugins/cpt-onomies/ CPT-
 onomies], I ran into an interesting error with
 _wp_menu_item_classes_by_context().

 In this function, when setting the parent class, there is a large if
 statement that assumes that `$queried_object->ancestors` and
 `$possible_taxonomy_ancestors[ $parent_item->object ]` are arrays.

--
Ticket URL: <http://core.trac.wordpress.org/ticket/24548>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list