#14168 closed defect (bug) (fixed)
Redundant line in WP_Http
Reported by: | rmccue | Owned by: | rmccue |
---|---|---|---|
Milestone: | 3.1 | Priority: | normal |
Severity: | trivial | Version: | 3.0 |
Component: | HTTP API | Keywords: | has-patch |
Focuses: | Cc: |
Description
WP_Http has a redundant line, where it strtolower()s a field name after it has already been strtolower()ed.
Attached patch fixes.
(I didn't think it was worth the ticket, but hey, jjj convinced me ;) )
Attachments (1)
Change History (9)
#3
follow-ups:
↓ 4
↓ 5
@
15 years ago
Not to mention it's doing ==
and not ===
so the capitalization doesn't matter. :)
#4
in reply to:
↑ 3
@
15 years ago
Replying to Viper007Bond:
Not to mention it's doing
==
and not===
so the capitalization doesn't matter. :)
var_dump( 'test' == 'Test' ); var_dump( 'test' === 'Test' ); bool(false) bool(false)
Equals versus identical has to do with type. Capitalization changes the value itself.
#5
in reply to:
↑ 3
@
15 years ago
Replying to Viper007Bond:
Not to mention it's doing
==
and not===
so the capitalization doesn't matter. :)
IIRC, only !strcasecmp($x, $y)
would compare strings case-insensitively.
#6
@
15 years ago
I think I've made this mistake before. I keep thinking 'test' == 'Test'
but 'test' !== 'Test'
. Whoops. :)
One-liner patch