Fix variable collission in _get_cat_children. see #3985
git-svn-id: http://svn.automattic.com/wordpress/trunk@5295 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
2e72244bde
commit
c28054301c
|
@ -267,9 +267,9 @@ function &_get_cat_children($category_id, $categories) {
|
||||||
return array();
|
return array();
|
||||||
|
|
||||||
$category_list = array();
|
$category_list = array();
|
||||||
$children = _get_category_hierarchy();
|
$has_children = _get_category_hierarchy();
|
||||||
|
|
||||||
if ( ( 0 != $category_id ) && ! isset($children[$category_id]) )
|
if ( ( 0 != $category_id ) && ! isset($has_children[$category_id]) )
|
||||||
return array();
|
return array();
|
||||||
|
|
||||||
foreach ( $categories as $category ) {
|
foreach ( $categories as $category ) {
|
||||||
|
@ -279,7 +279,7 @@ function &_get_cat_children($category_id, $categories) {
|
||||||
if ( $category->category_parent == $category_id ) {
|
if ( $category->category_parent == $category_id ) {
|
||||||
$category_list[] = $category;
|
$category_list[] = $category;
|
||||||
|
|
||||||
if ( !isset($children[$category->cat_ID]) )
|
if ( !isset($has_children[$category->cat_ID]) )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if ( $children = _get_cat_children($category->cat_ID, $categories) )
|
if ( $children = _get_cat_children($category->cat_ID, $categories) )
|
||||||
|
|
Loading…
Reference in New Issue