get_terms() assumes its taxonomies argument is a numeric array with a 0 key
|Reported by:||nbachiyski||Owned by:|
In a few places in get_terms() we are using $taxonomies 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.
Change History (5)
- Summary changed from get_terms() assumes its taxonomies argument is 0-based to get_terms() assumes its taxonomies argument is a numeric array