Files
wordpress/wp-includes
johnjamesjacoby f70e032c5f Canonical: prevent possible "Undefined array key" PHP error in redirect_canonical(), if the path or query array keys have gone missing.
This commit checks for the existence of (and re-adds if necessary) the `path` and `query` array keys after the `$redirect` variable has potentially been replaced by a second call to `parse_url()`.

This may happen when redirecting back to the root domain, without any path ('/example/`) or query (`?example=1`) to parse.

Props chrismattix, dhruvang21.

Fixes #63733.
Built from https://develop.svn.wordpress.org/trunk@60496


git-svn-id: http://core.svn.wordpress.org/trunk@59832 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-07-22 16:25:31 +00:00
..
2025-07-08 12:33:41 +00:00