Opened 11 months ago
Closed 4 weeks ago
#60173 closed defect (bug) (duplicate)
Warning: Undefined array key "host"
Reported by: | ainsleyclark | Owned by: | |
---|---|---|---|
Milestone: | 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 (3)
This ticket was mentioned in PR #5827 on WordPress/wordpress-develop by @sebastienserre.
11 months ago
#1
- Keywords has-patch added
#2
@
11 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.
#3
@
4 weeks ago
- Milestone Awaiting Review deleted
- Resolution set to duplicate
- Status changed from new to closed
There have been several recent additional reports of this notice/warning, so I'd like to formally mark this as a duplicate to consolidate discussion and review of approaches to fix it over in #34353.
https://core.trac.wordpress.org/ticket/60173