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)
7 years ago
- Summary changed from empty() and "0" in class-http.php to HTTP API is not allowing '0' for headers and cookies.
- Owner set to dd32
- Status changed from new to accepted
- Keywords has-patch needs-testing removed
- Milestone changed from Future Release to 3.5
- Resolution set to fixed
- Status changed from accepted to closed
- Resolution fixed deleted
- Status changed from closed to reopened