diff --git a/wp-includes/category.php b/wp-includes/category.php index fcbb737ee..d2b6bee33 100644 --- a/wp-includes/category.php +++ b/wp-includes/category.php @@ -141,7 +141,8 @@ function &get_categories($args = '') { $cache[ $key ] = $categories; wp_cache_set( 'get_categories', $cache, 'category' ); - return apply_filters('get_categories', $categories, $r); + $categories = apply_filters('get_categories', $categories, $r); + return $categories; } // Retrieves category data given a category ID or category object. diff --git a/wp-includes/plugin.php b/wp-includes/plugin.php index 9482932cf..386f3f5cd 100644 --- a/wp-includes/plugin.php +++ b/wp-includes/plugin.php @@ -74,7 +74,7 @@ function apply_filters($tag, $string) { function merge_filters($tag) { global $wp_filter, $merged_filters; - if ( is_array($wp_filter['all']) ) + if ( isset($wp_filter['all']) && is_array($wp_filter['all']) ) $wp_filter[$tag] = array_merge($wp_filter['all'], (array) $wp_filter[$tag]); if ( isset($wp_filter[$tag]) ){