Ticket #6960: 6960.patch

File 6960.patch, 0.8 kB (added by Sam_a, 5 months ago)

Checks if $taxonomy->args property is set

  • wp-includes/taxonomy.php

    old new  
    10571057        if ( count($taxonomies) > 1 ) { 
    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))); 
    10631063                        } 
    10641064                } 
    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        } 
    10701070