[wp-trac] [WordPress Trac] #23284: Wrong parameter order for stripos in wp-includes/functions.php
WordPress Trac
noreply at wordpress.org
Wed Jun 19 08:31:54 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.2
Component: General | Version: 3.5
Severity: normal | Resolution:
Keywords: has-patch |
--------------------------+--------------------
Comment (by nacin):
First, some history. [3857] added the initial protocol support. A much
younger MarkJaquith left a comment on #2793 that explained it:
* "No longer freaks out if you pass it a full URL with http:// or
https://"
You can see in http://core.trac.wordpress.org/browser/trunk/wp-
includes/functions.php?annotate=blame&rev=3857#L839 that we used to look
for `/`, which when a full protocol was supplied, that's what got tripped
up.
Thanks to a few of you for pointing out that a full URL with = but not ?
is functional, if weird, and is thus why this code is required. As Sergey
pointed out in #23402, simply fixing the arguments would be best. Let's
make sure this is fully unit tested soon, to make sure we don't go on wild
chases in the future.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/23284#comment:13>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list