Since PHP7, json_decode throws an syntax-error exception when the data is empty.
When given a empty object, it will work correctly ( '{}' instead of '""' )
When we call a service REST endpoint, which return a 200 http response with an empty body, we got an exception.
I've created a little patch to resolve this when the endpoint return an empty body instead of an empty object.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 3026550-httpclient_unserialize_empty_json_body.patch | 542 bytes | pbosmans |
Comments
Comment #2
pbosmans commented