Changeset 37324
- Timestamp:
- 04/29/2016 01:14:18 PM (9 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/query.php
r37281 r37324 1594 1594 $qv['day'] = absint($qv['day']); 1595 1595 $qv['w'] = absint($qv['w']); 1596 $qv['m'] = preg_replace( '|[^0-9]|', '', $qv['m'] );1596 $qv['m'] = is_scalar( $qv['m'] ) ? preg_replace( '|[^0-9]|', '', $qv['m'] ) : ''; 1597 1597 $qv['paged'] = absint($qv['paged']); 1598 1598 $qv['cat'] = preg_replace( '|[^0-9,-]|', '', $qv['cat'] ); // comma separated list of positive or negative integers -
trunk/tests/phpunit/tests/query/date.php
r35186 r37324 259 259 } 260 260 261 /** 262 * @ticket 36718 263 */ 264 public function test_non_scalar_m_should_be_discarded() { 265 $expected = $this->_get_query_result( ); 266 $posts = $this->_get_query_result( array( 267 'm' => array( '1234' ), // ignored 268 ) ); 269 270 $this->assertEquals( $expected, $posts ); 271 } 272 261 273 public function test_simple_monthnum_expecting_results() { 262 274 $posts = $this->_get_query_result( array(
Note: See TracChangeset
for help on using the changeset viewer.