From 96c73cc917b4e2b00c4a205263dd24bdceab6b36 Mon Sep 17 00:00:00 2001 From: ryan Date: Mon, 19 May 2008 18:47:33 +0000 Subject: [PATCH] Make sure taxonomy args are set before using. Props Sam_a. fixes #6960 for trunk git-svn-id: http://svn.automattic.com/wordpress/trunk@7952 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/taxonomy.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/taxonomy.php b/wp-includes/taxonomy.php index 7ff488fca..dcc0d3420 100644 --- a/wp-includes/taxonomy.php +++ b/wp-includes/taxonomy.php @@ -1057,14 +1057,14 @@ function wp_get_object_terms($object_ids, $taxonomies, $args = array()) { if ( count($taxonomies) > 1 ) { foreach ( $taxonomies as $index => $taxonomy ) { $t = get_taxonomy($taxonomy); - if ( is_array($t->args) && $args != array_merge($args, $t->args) ) { + if ( isset($t->args) && is_array($t->args) && $args != array_merge($args, $t->args) ) { unset($taxonomies[$index]); $terms = array_merge($terms, wp_get_object_terms($object_ids, $taxonomy, array_merge($args, $t->args))); } } } else { $t = get_taxonomy($taxonomies[0]); - if ( is_array($t->args) ) + if ( isset($t->args) && is_array($t->args) ) $args = array_merge($args, $t->args); }