Just had my server rebooted and now five errors, all related to canonical.php in the wp-includes folder show up:
[Sun Sep 22 19:55:37.037647 2019] [php7:notice] PHP Notice: Undefined index: host in /www/webroot/cafed/wordpress/wp-includes/canonical.php on line 507
[Sun Sep 22 19:55:37.037679 2019] [php7:notice] PHP Notice: Undefined index: host in /www/webroot/cafed/wordpress/wp-includes/canonical.php on line 508
[Sun Sep 22 19:55:37.037702 2019] [php7:notice] PHP Notice: Undefined index: host in /www/webroot/cafed/wordpress/wp-includes/canonical.php on line 508
[Sun Sep 22 19:55:37.037708 2019] [php7:notice] PHP Notice: Undefined index: host in /www/webroot/cafed/wordpress/wp-includes/canonical.php on line 509
[Sun Sep 22 19:55:37.037714 2019] [php7:notice] PHP Notice: Undefined index: host in /www/webroot/cafed/wordpress/wp-includes/canonical.php on line 512
That seems to relate to this piece of 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'];
}
$compare_original = array( $original['host'], $original['path'] );
Seems to have something related to non-www vs www domains.
Any idea how to correct this?