Make WordPress Core


Ignore:
Timestamp:
09/09/2016 07:36:22 PM (8 years ago)
Author:
boonebgorges
Message:

Query: Avoid PHP notice in get_queried_object() when query contains NOT EXISTS tax query.

Props johnjamesjacoby.
See #37962.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-query.php

    r38491 r38585  
    32653265                    $query = $tax_query_in_and[ $matched_taxonomy ];
    32663266
    3267                     if ( $query['terms'] ) {
     3267                    if ( ! empty( $query['terms'] ) ) {
    32683268                        if ( 'term_id' == $query['field'] ) {
    32693269                            $term = get_term( reset( $query['terms'] ), $matched_taxonomy );
Note: See TracChangeset for help on using the changeset viewer.