[wp-trac] [WordPress Trac] #63316: [E_WARNING] Undefined array key "host" in wp-includes/canonical.php on line 717

WordPress Trac noreply at wordpress.org
Thu Jul 24 13:24:19 UTC 2025


#63316: [E_WARNING] Undefined array key "host" in wp-includes/canonical.php on line
717
-------------------------------------------------+-------------------------
 Reporter:  ArtZ91                               |       Owner:
                                                 |  johnjamesjacoby
     Type:  defect (bug)                         |      Status:  assigned
 Priority:  normal                               |   Milestone:  6.9
Component:  Canonical                            |     Version:  2.3
 Severity:  minor                                |  Resolution:
 Keywords:  has-test-info has-patch dev-         |     Focuses:
  feedback needs-unit-tests                      |
-------------------------------------------------+-------------------------
Changes (by SirLouen):

 * keywords:  has-test-info has-patch dev-feedback => has-test-info has-
     patch dev-feedback needs-unit-tests


Comment:

 Given that there are so many values now, I have implemented a little mod
 in my PR that is a little simpler than so many conditionals.

 Maybe we should be adding tests, but `assertCanonical` doesn't admit
 headers, only the URL maybe another function is required, or improving it
 to accept Headers.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/63316#comment:26>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list