Make WordPress Core

Opened 4 months ago

Last modified 2 months ago

#60173 new defect (bug)

Warning: Undefined array key "host"

Reported by: ainsleyclark's profile ainsleyclark Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Canonical Keywords: has-patch
Focuses: Cc:

Description

I encountered an issue on my WordPress website where an ErrorException is thrown, displaying the following error message:

ErrorException
Warning: Undefined array key "host"

This error occurs in the canonical.php file on line 718 of the /wp-includes/ directory. Here is the relevant code snippet:

$compare_original = array( $original['host'], $original['path'] );

Additionally, the error stack trace includes the following information:

/wp-includes/canonical.php in redirect_canonical at line 718

Change History (2)

#2 @SergeyBiryukov
4 months ago

  • Component changed from General to Canonical

Hi there, welcome to WordPress Trac! Thanks for the ticket.

Just noting that there is an ongoing discussion on fixing these notices in #34353.

Note: See TracTickets for help on using tickets.