Ticket #60059: 60059.diff
| File 60059.diff, 1.2 KB (added by , 2 years ago) |
|---|
-
src/wp-includes/canonical.php
316 316 $redirect['query'] = remove_query_arg( 'year', $redirect['query'] ); 317 317 } 318 318 } 319 } elseif ( is_author() && ! empty( $_GET['author'] ) && preg_match( '|^[0-9]+$|', $_GET['author'] ) ) {319 } elseif ( is_author() && ! empty( $_GET['author'] ) && is_string( $_GET['author'] ) && preg_match( '|^[0-9]+$|', $_GET['author'] ) ) { 320 320 $author = get_userdata( get_query_var( 'author' ) ); 321 321 322 322 if ( false !== $author -
tests/phpunit/tests/canonical.php
206 206 array( '/?author=%d', '/author/canonical-author/' ), 207 207 // array( '/?author=%d&year=2008', '/2008/?author=3'), 208 208 // array( '/author/canonical-author/?year=2008', '/2008/?author=3'), // Either or, see previous testcase. 209 array( '/author/canonical-author/?author[1]=hello', '/author/canonical-author/?author[1]=hello' ), 209 210 210 211 // Feeds. 211 212 array( '/?feed=atom', '/feed/atom/' ),