Make WordPress Core


Ignore:
Timestamp:
09/16/2015 06:49:28 PM (9 years ago)
Author:
boonebgorges
Message:

Failed get_term_by() lookups should always return false.

Previously, we sometimes returned null.

Props charlestonsw, tyxla.
Fixes #33281.

File:
1 edited

Legend:

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

    r34217 r34246  
    804804    } else {
    805805        $term = get_term( (int) $value, $taxonomy, $output, $filter );
    806         if ( is_wp_error( $term ) )
     806        if ( is_wp_error( $term ) || is_null( $term ) ) {
    807807            $term = false;
     808        }
    808809        return $term;
    809810    }
Note: See TracChangeset for help on using the changeset viewer.