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:
parent
5a1552a8ac
commit
e5d44de18c
|
@ -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).'" ';
|
||||
|
|
Loading…
Reference in New Issue