Make WordPress Core

Changeset 22433


Ignore:
Timestamp:
11/07/2012 08:00:51 PM (14 years ago)
Author:
nacin
Message:

Only call wp_get_object_terms() if get_object_term_cache() says there is no cache (false), which is different than no terms. props wonderboymusic, fixes #16505.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/media.php

    r22409 r22433  
    986986
    987987                $terms = get_object_term_cache($post->ID, $taxonomy);
    988                 if ( empty($terms) )
     988                if ( false === $terms )
    989989                        $terms = wp_get_object_terms($post->ID, $taxonomy, $t['args']);
    990990
  • trunk/wp-includes/taxonomy.php

    r22417 r22433  
    31123112
    31133113                $terms = get_object_term_cache($post->ID, $taxonomy);
    3114                 if ( empty($terms) )
     3114                if ( false === $terms )
    31153115                        $terms = wp_get_object_terms($post->ID, $taxonomy, $t['args']);
    31163116
    … …  
    31623162
    31633163        $object_terms = get_object_term_cache( $object_id, $taxonomy );
    3164         if ( empty( $object_terms ) )
     3164        if ( false === $terms )
    31653165                 $object_terms = wp_get_object_terms( $object_id, $taxonomy );
    31663166
Note: See TracChangeset for help on using the changeset viewer.