Changeset 36278
- Timestamp:
- 01/13/2016 04:36:54 AM (9 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/query.php
r36251 r36278 2776 2776 2777 2777 // If a search pattern is specified, load the posts that match. 2778 if ( ! empty( $q['s'] ) ) {2778 if ( strlen( $q['s'] ) ) { 2779 2779 $search = $this->parse_search( $q ); 2780 2780 } -
trunk/tests/phpunit/tests/query/search.php
r36251 r36278 138 138 $this->assertNotRegExp( '|ORDER BY \(CASE[^\)]+\)|', $q->request ); 139 139 } 140 141 /** 142 * @ticket 31025 143 */ 144 public function test_s_zero() { 145 $p1 = $this->factory->post->create( array( 146 'post_status' => 'publish', 147 'post_title' => '1', 148 ) ); 149 150 $p2 = $this->factory->post->create( array( 151 'post_status' => 'publish', 152 'post_title' => '0', 153 ) ); 154 155 $q = new WP_Query( array( 156 's' => '0', 157 'fields' => 'ids', 158 ) ); 159 160 $this->assertEqualSets( array( $p2 ), $q->posts ); 161 } 140 162 }
Note: See TracChangeset
for help on using the changeset viewer.