WordPress.org

Make WordPress Core

Changeset 7952


Ignore:
Timestamp:
05/19/08 18:47:33 (7 years ago)
Author:
ryan
Message:

Make sure taxonomy args are set before using. Props Sam_a. fixes #6960 for trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/taxonomy.php

    r7940 r7952  
    10581058        foreach ( $taxonomies as $index => $taxonomy ) { 
    10591059            $t = get_taxonomy($taxonomy); 
    1060             if ( is_array($t->args) && $args != array_merge($args, $t->args) ) { 
     1060            if ( isset($t->args) && is_array($t->args) && $args != array_merge($args, $t->args) ) { 
    10611061                unset($taxonomies[$index]); 
    10621062                $terms = array_merge($terms, wp_get_object_terms($object_ids, $taxonomy, array_merge($args, $t->args))); 
     
    10651065    } else { 
    10661066        $t = get_taxonomy($taxonomies[0]); 
    1067         if ( is_array($t->args) ) 
     1067        if ( isset($t->args) && is_array($t->args) ) 
    10681068            $args = array_merge($args, $t->args); 
    10691069    } 
Note: See TracChangeset for help on using the changeset viewer.