[wp-trac] [WordPress Trac] #23506: get_terms() assumes its taxonomies argument is 0-based
WordPress Trac
noreply at wordpress.org
Mon Feb 18 23:41:43 UTC 2013
#23506: get_terms() assumes its taxonomies argument is 0-based
-----------------------------+--------------------------
Reporter: nbachiyski | Type: defect (bug)
Status: new | Priority: normal
Milestone: Awaiting Review | Component: Taxonomy
Version: trunk | Severity: normal
Keywords: has-patch |
-----------------------------+--------------------------
In a few places in `get_terms()` we are using `$taxonomies[0]` after we've
established that we have more than one taxonomy. The array isn't always
0-based, though.
For example, `get_taxonomies()` returns arrays with the taxonomy name as a
key, which breaks this pattern.
In the attached patch, the taxonomies are run through `array_values()`,
which gives us a 0-based array of the taxonomies.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/23506>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list