[wp-trac] [WordPress Trac] #23284: Wrong parameter order for stripos in wp-includes/functions.php

WordPress Trac noreply at wordpress.org
Thu Jan 24 15:57:04 UTC 2013


#23284: Wrong parameter order for stripos in wp-includes/functions.php
--------------------------+--------------------
 Reporter:  Kalindor      |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  3.5.1
Component:  General       |     Version:  3.5
 Severity:  normal        |  Resolution:
 Keywords:                |
--------------------------+--------------------

Comment (by nacin):

 Best I can tell, we are dealing with a bit of dead code here.

 Next to the `$protocol` check, #4903 added a check for `strpos( $uri, '='
 ) === false`. There is never a situation where the former is true, while
 the latter is false. By this point, a URL will not have `=` as long as it
 has a protocol, because that means it also must have a `?`, which is the
 earlier `if` branch. A URL like 'http://example.com/=' isn't valid, but is
 the only thing that would fail here.

 [attachment:23284.diff] is a patch for 3.6. For 3.5, we can switch back
 the variables.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/23284#comment:3>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list