[wp-trac] [WordPress Trac] #24548: _wp_menu_item_classes_by_context assumes $queried_object->ancestors is an array
WordPress Trac
noreply at wordpress.org
Tue Mar 25 21:03:04 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 reporter-feedback | Focuses:
-----------------------------------------+------------------------------
Changes (by nacin):
* keywords: has-patch dev-feedback => has-patch reporter-feedback
* milestone: 3.9 => Awaiting Review
Comment:
When are either of these not arrays?
For the first one, post objects always return get_post_ancestors(), which
always returns an array. (It briefly did not: #22882.)
For the second one, that array must be set (the line above it) before it
is treated as an array. It is set to be an array within the function.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/24548#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list