Make WordPress Core


Ignore:
Timestamp:
11/07/2012 08:00:51 PM (13 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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.