Skip to content

Commit

Permalink
Make sure taxonomy args are set before using. Props Sam_a. fixes #696…
Browse files Browse the repository at this point in the history
…0 for 2.5

git-svn-id: https://develop.svn.wordpress.org/branches/2.5@7953 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
ryanboren committed May 19, 2008
1 parent 60e0df0 commit 49b691e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions wp-includes/taxonomy.php
Expand Up @@ -1058,14 +1058,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);
}

Expand Down

0 comments on commit 49b691e

Please sign in to comment.