Make WordPress Core


Ignore:
Timestamp:
12/29/2023 01:52:57 PM (16 months ago)
Author:
SergeyBiryukov
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/canonical.php

    r56657 r57232  
    207207            // array( '/?author=%d&year=2008', '/2008/?author=3'),
    208208            // 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', 60059 ),
    209210
    210211            // Feeds.
Note: See TracChangeset for help on using the changeset viewer.