mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-10-05 15:16:59 +00:00
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:
@@ -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]);
|
||||
|
||||
Reference in New Issue
Block a user