WordPress.org

Make WordPress Core

Ticket #21967: check-terms-for-null.diff

File check-terms-for-null.diff, 493 bytes (added by wonderboymusic, 6 years ago)
  • wp-includes/query.php

     
    29972997
    29982998                        if ( 'term_id' == $query['field'] )
    29992999                                $term = get_term( reset( $query['terms'] ), $query['taxonomy'] );
    3000                         else
     3000                        elseif ( $query['terms'] )
    30013001                                $term = get_term_by( $query['field'], reset( $query['terms'] ), $query['taxonomy'] );
    30023002
    30033003                        if ( $term && ! is_wp_error($term) )  {