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

WordPress Trac noreply at wordpress.org
Tue Aug 14 12:23:52 UTC 2018


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

Comment (by RavanH):

 Not sure if this is completely related or just sounds very similar
 (involving **path**, not host or scheme) but I'll share it here as it may
 help in testing. I've encountered the following on a clean install of WP
 4.9.8 with default theme and no plugins activated.

 1. Turn WP_DEBUG is on (obviously)
 2. Set permalinks to Numeric
 3. Visit a non-existent feed by it's plain URL, for example /?feed=sitemap

 Notices shown:

 {{{
 PHP Notice:  Undefined index: path in /var/www/html/wp-
 includes/canonical.php on line 393
 PHP Notice:  Undefined index: path in /var/www/html/wp-
 includes/canonical.php on line 393
 PHP Notice:  Undefined index: path in /var/www/html/wp-
 includes/canonical.php on line 465
 }}}

 You may ask: Why bother with non-existent feeds? Answer: Plugin developers
 (as I) may add custom feed URLs and will encounter this notice during
 development (like I did) ... and waste a lot of time trying to find out
 what is going on ;)

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


More information about the wp-trac mailing list