[wp-trac] [WordPress Trac] #34353: redirect_canonical() – Undefined indexes 'host' and 'scheme'

WordPress Trac noreply at wordpress.org
Thu Aug 28 12:27:45 UTC 2025


#34353: redirect_canonical() – Undefined indexes 'host' and 'scheme'
--------------------------------------+-----------------------------
 Reporter:  theamila                  |       Owner:  (none)
     Type:  defect (bug)              |      Status:  reopened
 Priority:  normal                    |   Milestone:  Future Release
Component:  Canonical                 |     Version:  4.3.1
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:
--------------------------------------+-----------------------------

Comment (by mikemeinz):

 Fairly frequently, seeing these warnings in the PHP error_log.
 This ticket is 10 years old????
 Is there any estimate of when canonical.php will be updated to prevent
 these warnings?

 {{{
 [23-Aug-2025 01:17:57 UTC] PHP Warning:  Undefined array key "host" in
 /home/www/public_html/wp-includes/canonical.php on line 717
 [23-Aug-2025 01:17:57 UTC] PHP Warning:  Undefined array key "host" in
 /home/www/public_html/wp-includes/canonical.php on line 728
 [23-Aug-2025 01:17:57 UTC] PHP Warning:  Undefined array key "host" in
 /home/www/public_html/wp-includes/canonical.php on line 731
 }}}


 {{{
 [14-Aug-2025 19:23:52 UTC] PHP Warning:  Undefined array key "scheme" in
 /home/www/public_html/wp-includes/canonical.php on line 752
 }}}


 PHP 8.3
 WordPress 6.8.2

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


More information about the wp-trac mailing list