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
This commit is contained in:
markjaquith 2006-10-03 22:04:34 +00:00
parent 5a1552a8ac
commit e5d44de18c
1 changed files with 1 additions and 1 deletions

View File

@ -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 = '<a href="'.get_category_link($category->cat_ID).'" ';