[wp-trac] [WordPress Trac] #34353: redirect_canonical() – Undefined indexes 'host' and 'scheme'
WordPress Trac
noreply at wordpress.org
Tue May 7 07:41:33 UTC 2019
#34353: redirect_canonical() – Undefined indexes 'host' and 'scheme'
------------------------------------------+-----------------------------
Reporter: theamila | Owner: (none)
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: Future Release
Component: Canonical | Version: 4.3.1
Severity: normal | Resolution:
Keywords: needs-patch needs-unit-tests | Focuses:
------------------------------------------+-----------------------------
Comment (by Kovah):
Unfortunately this is still an issue in WP 5.1.1 and currently littering
our Sentry logs.
As of 5.1.1, line 504 of /wp/wp-includes/canonical.php is throwing the
"Undefined index: host" error.
Corresponding code:
{{{
// Ignore differences in host capitalization, as this can lead to
infinite redirects
// Only redirect no-www <=> yes-www
>>> if ( strtolower( $original['host'] ) == strtolower( $redirect['host']
) ||
( strtolower( $original['host'] ) != 'www.' . strtolower(
$redirect['host'] ) && 'www.' . strtolower( $original['host'] ) !=
strtolower( $redirect['host'] ) ) ) {
$redirect['host'] = $original['host'];
}
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/34353#comment:18>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list