From c28054301cd94125e13a7bd6cf001334f495ed21 Mon Sep 17 00:00:00 2001 From: ryan Date: Mon, 23 Apr 2007 20:28:38 +0000 Subject: [PATCH] Fix variable collission in _get_cat_children. see #3985 git-svn-id: http://svn.automattic.com/wordpress/trunk@5295 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/category.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/wp-includes/category.php b/wp-includes/category.php index b60fd238e..2d719eb9f 100644 --- a/wp-includes/category.php +++ b/wp-includes/category.php @@ -267,9 +267,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 ) { @@ -279,9 +279,9 @@ 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) ) $category_list = array_merge($category_list, $children); }