Changeset 38585
- Timestamp:
- 09/09/2016 07:36:22 PM (9 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
-
src/wp-includes/class-wp-query.php (modified) (1 diff)
-
tests/phpunit/tests/query.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-query.php
r38491 r38585 3265 3265 $query = $tax_query_in_and[ $matched_taxonomy ]; 3266 3266 3267 if ( $query['terms']) {3267 if ( ! empty( $query['terms'] ) ) { 3268 3268 if ( 'term_id' == $query['field'] ) { 3269 3269 $term = get_term( reset( $query['terms'] ), $matched_taxonomy ); -
trunk/tests/phpunit/tests/query.php
r36484 r38585 119 119 } 120 120 121 /** 122 * @ticket 37962 123 */ 124 public function test_get_queried_object_should_return_null_for_not_exists_tax_query() { 125 register_taxonomy( 'wptests_tax', 'post' ); 126 127 $q = new WP_Query( array( 128 'tax_query' => array( 129 array( 130 'taxonomy' => 'wptests_tax', 131 'operator' => 'NOT EXISTS', 132 ), 133 ), 134 ) ); 135 136 $queried_object = $q->get_queried_object(); 137 $this->assertNull( $queried_object ); 138 } 139 121 140 public function test_orderby_space_separated() { 122 141 global $wpdb;
Note: See TracChangeset
for help on using the changeset viewer.