[wp-trac] [WordPress Trac] #34353: redirect_canonical() – Undefined indexes 'host' and 'scheme'
WordPress Trac
noreply at wordpress.org
Mon Dec 13 20:11:37 UTC 2021
#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 jorschot):
changed line 66 to 71 to
{{{
if (( ! $requested_url && isset( $_SERVER['HTTP_HOST'] ) ) ||
$requested_url==0 ) {
// Build the URL in the address bar.
$requested_url = is_ssl() ? 'https://' : 'http://';
$requested_url .= $_SERVER['HTTP_HOST'];
$requested_url .= $_SERVER['REQUEST_URI'];
}
}}}
That worked for me
--
Ticket URL: <https://core.trac.wordpress.org/ticket/34353#comment:30>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list