HTTP API is not allowing '0' for headers and cookies.
|Reported by:||mailnew2ster||Owned by:||dd32|
I just saw you have a nice implementation of an http class, but while looking at it, I've noticed a minor bug:
You use the empty() function to check whether strings are empty, for example in the WP_Http_Cookie class. This is not a correct thing to do, because empty() returns true also for a "0" string, which is not really empty. That way, a cookie like that: "balloons=0", will just be skipped!
You'd better use a ($string == "") comperation.
Change History (31)
- Keywords has-patch needs-testing added; empty 0 zero http class removed
comment:9 jacobsantos — 3 years ago
- Summary changed from empty() and "0" in class-http.php to HTTP API is not allowing '0' for headers and cookies.
comment:14 dd32 — 17 months ago
- Owner set to dd32
- Status changed from new to accepted
comment:16 dd32 — 17 months ago
- Keywords has-patch needs-testing removed
- Milestone changed from Future Release to 3.5
comment:24 follow-up: ↓ 25 dd32 — 15 months ago
- Resolution set to fixed
- Status changed from accepted to closed
comment:25 in reply to: ↑ 24 duck_ — 15 months ago
- Resolution fixed deleted
- Status changed from closed to reopened