#32229 closed defect (bug) (fixed)
redirect_canonical - Undefined Index HTTP_HOST
Reported by: | Howdy_McGee | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | 4.4 | Priority: | normal |
Severity: | normal | Version: | 4.2.1 |
Component: | Canonical | Keywords: | has-patch commit |
Focuses: | administration | Cc: |
Description
One of my more popular installs is getting its debug.log
blasted with notices:
PHP Notice: Undefined index: HTTP_HOST in /wp-includes/canonical.php on line 63
Which is in this conditional block of redirect_canonical
if ( !$requested_url ) { // build the URL in the address bar $requested_url = is_ssl() ? 'https://' : 'http://'; $requested_url .= $_SERVER['HTTP_HOST']; $requested_url .= $_SERVER['REQUEST_URI']; }
This is more than likely being generated by bots hitting pages that no longer exist or have never existed. I created a support topic on the issue which then was told to create a ticket. I believe my 2nd notice ( in the support question ) is also related.
Attachments (1)
Change History (7)
Note: See
TracTickets for help on using
tickets.
I've also created a
debug_backtrace
of the issue incase it's any help:Also a related bug:
PHP Notice: Undefined index: HTTP_HOST in /httpdocs/wp-includes/nav-menu-template.php on line 549
If need be I can create a
debug_backtrace
on that too.