Changeset 49108 for trunk/src/wp-includes/rewrite.php
- Timestamp:
- 10/08/2020 09:13:57 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rewrite.php
r48695 r49108 401 401 if ( preg_match( '/^([0-9]{4})\-([0-9]{2})/', $post->post_date, $matches ) && isset( $query_vars['year'] ) && ( 'monthnum' === $compare || 'day' === $compare ) ) { 402 402 // $matches[1] is the year the post was published. 403 if ( intval( $query_vars['year'] ) !== intval( $matches[1] )) {403 if ( (int) $query_vars['year'] !== (int) $matches[1] ) { 404 404 return $query_vars; 405 405 } 406 406 407 407 // $matches[2] is the month the post was published. 408 if ( 'day' === $compare && isset( $query_vars['monthnum'] ) && intval( $query_vars['monthnum'] ) !== intval( $matches[2] )) {408 if ( 'day' === $compare && isset( $query_vars['monthnum'] ) && (int) $query_vars['monthnum'] !== (int) $matches[2] ) { 409 409 return $query_vars; 410 410 } … … 438 438 // If we've gotten to this point, we have a slug/date clash. First, adjust for nextpage. 439 439 if ( '' !== $maybe_page ) { 440 $query_vars['page'] = intval( $maybe_page );440 $query_vars['page'] = (int) $maybe_page; 441 441 } 442 442
Note: See TracChangeset
for help on using the changeset viewer.