Commit fa40d08
committed
Canonical: prevent possible "Undefined array key" PHP error in
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@60496 602fd350-edb4-49c9-b593-d223f7449a82redirect_canonical(), if the path or query array keys have gone missing.1 parent 8a3c793 commit fa40d08
1 file changed
+8
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
615 | 615 | | |
616 | 616 | | |
617 | 617 | | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
618 | 626 | | |
619 | 627 | | |
620 | 628 | | |
| |||
0 commit comments