From e5d44de18c38d5e9743568bbe10a57f7f672dbde Mon Sep 17 00:00:00 2001 From: markjaquith Date: Tue, 3 Oct 2006 22:04:34 +0000 Subject: [PATCH] cast to array. props to Denis de Bernardy, Nazgul. fixes #3179 git-svn-id: http://svn.automattic.com/wordpress/branches/2.0@4280 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/template-functions-category.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/template-functions-category.php b/wp-includes/template-functions-category.php index 1858bec4f9..02e42a198a 100644 --- a/wp-includes/template-functions-category.php +++ b/wp-includes/template-functions-category.php @@ -318,7 +318,7 @@ function list_cats($optionall = 1, $all = 'All', $sort_column = 'ID', $sort_orde $num_found=0; $thelist = ""; - foreach ( $categories as $category ) { + foreach ( (array) $categories as $category ) { if ( ( intval($hide_empty) == 0 || $category->category_count) && (!$hierarchical || $category->category_parent == $child_of) ) { $num_found++; $link = '