mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-13 05:10:18 +00:00
Canonical: Check if the author parameter is a string in redirect_canonical().
This avoids a PHP warning or error when viewing an author on the front end, while an array is passed as `$_GET['author']`. Follow-up to [12034], [12040], [12202]. Props david.binda, antonvlasenko, azaozz, SergeyBiryukov. Fixes #60059. git-svn-id: https://develop.svn.wordpress.org/trunk@57232 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -206,6 +206,7 @@ class Tests_Canonical extends WP_Canonical_UnitTestCase {
|
||||
array( '/?author=%d', '/author/canonical-author/' ),
|
||||
// array( '/?author=%d&year=2008', '/2008/?author=3'),
|
||||
// array( '/author/canonical-author/?year=2008', '/2008/?author=3'), // Either or, see previous testcase.
|
||||
array( '/author/canonical-author/?author[1]=hello', '/author/canonical-author/?author[1]=hello', 60059 ),
|
||||
|
||||
// Feeds.
|
||||
array( '/?feed=atom', '/feed/atom/' ),
|
||||
|
||||
Reference in New Issue
Block a user