[wp-trac] [WordPress Trac] #27123: get_categories returning duplicate child categories in 3.9
WordPress Trac
noreply at wordpress.org
Fri Feb 14 00:45:01 UTC 2014
#27123: get_categories returning duplicate child categories in 3.9
--------------------------+-----------------------------
Reporter: BStofko | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: trunk
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
Executing the get_categories function for child categories returns
duplicate entries in version 3.9. This worked in version 3.8.1 so this is
something new.
My call:
{{{
$terms = get_categories( array ('child_of' => $cat));
}}}
Under version 3.8.1 returns:
{{{
terms:Array ( [0] => stdClass Object ( [term_id] => 7 [name] => Child
Category I [slug] => child-category-i [term_group] => 0 [term_taxonomy_id]
=> 7 [taxonomy] => category [description] => [parent] => 4 [count] => 1
[cat_ID] => 7 [category_count] => 1 [category_description] => [cat_name]
=> Child Category I [category_nicename] => child-category-i
[category_parent] => 4 ) )
}}}
Under version 3.9 returns:
{{{
terms:Array ( [0] => stdClass Object ( [term_id] => 7 [name] => Child
Category I [slug] => child-category-i [term_group] => 0 [term_taxonomy_id]
=> 7 [taxonomy] => category [description] => [parent] => 4 [count] => 1
[cat_ID] => 7 [category_count] => 1 [category_description] => [cat_name]
=> Child Category I [category_nicename] => child-category-i
[category_parent] => 4 ) [4] => stdClass Object ( [term_id] => 7 [name] =>
Child Category I [slug] => child-category-i [term_group] => 0
[term_taxonomy_id] => 7 [taxonomy] => category [description] => [parent]
=> 4 [count] => 1 [object_id] => 1746 [filter] => raw [cat_ID] => 7
[category_count] => 1 [category_description] => [cat_name] => Child
Category I [category_nicename] => child-category-i [category_parent] => 4
) )
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/27123>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list