Ticket #20604: tax-query-no-results-on-or.diff
| File tax-query-no-results-on-or.diff, 793 bytes (added by , 13 years ago) |
|---|
-
wp-includes/taxonomy.php
658 658 $join = ''; 659 659 $where = array(); 660 660 $i = 0; 661 $count = count( $this->queries ); 661 662 662 foreach ( $this->queries as $ query ) {663 foreach ( $this->queries as $index => $query ) { 663 664 $this->clean_query( $query ); 664 665 665 666 if ( is_wp_error( $query ) ) { … … 671 672 if ( 'IN' == $operator ) { 672 673 673 674 if ( empty( $terms ) ) { 674 if ( 'OR' == $this->relation ) 675 if ( 'OR' == $this->relation ) { 676 if ( $index + 1 === $count && empty( $where ) ) 677 return self::$no_results; 675 678 continue; 676 else679 } else 677 680 return self::$no_results; 678 681 } 679 682