Avoid php notices.

git-svn-id: http://svn.automattic.com/wordpress/trunk@5202 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2007-04-07 05:24:37 +00:00
parent 8661af0977
commit c3508de5be
2 changed files with 3 additions and 2 deletions

View File

@ -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.

View File

@ -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]) ){