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
This commit is contained in:
ryan 2008-05-19 18:47:33 +00:00
parent 9e4e87d975
commit 96c73cc917
1 changed files with 2 additions and 2 deletions

View File

@ -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);
}