From c3508de5beb7d125e92e98f60345719a792062af Mon Sep 17 00:00:00 2001 From: ryan Date: Sat, 7 Apr 2007 05:24:37 +0000 Subject: [PATCH] Avoid php notices. git-svn-id: http://svn.automattic.com/wordpress/trunk@5202 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/category.php | 3 ++- wp-includes/plugin.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) 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]) ){