Opened 8 years ago
Closed 5 years ago
#37909 closed defect (bug) (worksforme)
get_terms returns array with missing cells
Reported by: | eddr | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.6 |
Component: | Taxonomy | Keywords: | reporter-feedback |
Focuses: | Cc: |
Description
This call
get_terms( 'settings-set', array('hide_empty' => true) );
returns and array with cells 0,1,3,4,5,6 set (cell 2 is missing)
There are total of 7 terms and one is empty, so the returned terms of a complete set, but the array is broken
Change History (2)
Note: See
TracTickets for help on using
tickets.
@eddr Thanks for the ticket, and welcome to WordPress Trac!
I can't reproduce this issue. Even when
hide_empty
istrue
, array indexes should be consecutive with a default query.Are you running any plugins that may be filtering 'get_terms' or some other part of the term query process? Are you using a persistent object cache like Memcached? Are you able to reproduce the issue on a clean installation of WordPress, with no plugins (other than the one you use to register the taxonomy)?