[wp-trac] [WordPress Trac] #21608: get_the_terms() returns an array with keys that are not starting from 0

WordPress Trac noreply at wordpress.org
Wed Sep 25 14:07:20 UTC 2013


#21608: get_the_terms() returns an array with keys that are not starting from 0
--------------------------+----------------------
 Reporter:  boryanka      |       Owner:
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:
Component:  Taxonomy      |     Version:  3.4.1
 Severity:  normal        |  Resolution:  invalid
 Keywords:                |
--------------------------+----------------------

Comment (by dcavins):

 I noticed the behavior mentioned in this ticket, but only on the front
 end. When I use `get_the_terms` in the WP admin area, the array looks like
 this:


 {{{
 Array
 (
     [0] => stdClass Object
         (
             [term_id] => 1660
             [name] => Bonner County
             [slug] => bonner-county-idaho
             [term_group] => 0
             [term_taxonomy_id] => 1755
             [taxonomy] => geographies
             [description] => 05000US16017
             [parent] => 841
             [count] => 0
         )
 )
 }}}

--
Ticket URL: <http://core.trac.wordpress.org/ticket/21608#comment:9>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list