[wp-trac] [WordPress Trac] #49872: PHP Notice: Undefined index: path in /wp-includes/functions.php on line 905

WordPress Trac noreply at wordpress.org
Fri Apr 10 22:02:06 UTC 2020


#49872: PHP Notice:  Undefined index: path in /wp-includes/functions.php on line
905
--------------------------+-----------------------------
 Reporter:  jbouganim     |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  5.4
 Severity:  minor         |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 Some URLs here do not have a 'path' and thus throw this notice.
 Instead of only checking on /wp-includes/functions.php L904:
 {{{#!php
 <?php
 if ( false !== $url_parts )
 }}}

 should also check

 {{{#!php
 <?php
 if ( false !== $url_parts && !empty($url_parts['path']) )
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/49872>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list