Opened 10 years ago
Closed 8 years ago
#37909 closed defect (bug) (worksforme)
get_terms returns array with missing cells
| Reported by: | eddr | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Taxonomy | Version: | 4.6 |
| Severity: | normal | Keywords: | reporter-feedback |
| Cc: | Focuses: |
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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
@eddr Thanks for the ticket, and welcome to WordPress Trac!
I can't reproduce this issue. Even when
hide_emptyistrue, 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)?