Cast to array when using foreach(). Props santosj (and thanks for your perseverance!). fixes #2784

git-svn-id: https://develop.svn.wordpress.org/trunk@8572 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Mark Jaquith
2008-08-06 20:31:54 +00:00
parent 3937bd9530
commit 3cab99fbd2
22 changed files with 125 additions and 124 deletions
+1 -1
View File
@@ -43,7 +43,7 @@ function &get_categories($args = '') {
$taxonomy = 'category';
if ( 'link' == $args['type'] )
$taxonomy = 'link_category';
$categories = get_terms($taxonomy, $args);
$categories = (array) get_terms($taxonomy, $args);
foreach ( array_keys($categories) as $k )
_make_cat_compat($categories[$k]);