Fix variable collission in _get_cat_children. For 2.2. see #3985

git-svn-id: http://svn.automattic.com/wordpress/branches/2.2@5296 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2007-04-23 20:31:47 +00:00
parent fb198a068a
commit bac405380f
1 changed files with 4 additions and 4 deletions

View File

@ -251,9 +251,9 @@ function &_get_cat_children($category_id, $categories) {
return 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();
foreach ( $categories as $category ) {
@ -263,7 +263,7 @@ function &_get_cat_children($category_id, $categories) {
if ( $category->category_parent == $category_id ) {
$category_list[] = $category;
if ( !isset($children[$category->cat_ID]) )
if ( !isset($has_children[$category->cat_ID]) )
continue;
if ( $children = _get_cat_children($category->cat_ID, $categories) )