Skip to content
This repository has been archived by the owner on Feb 13, 2022. It is now read-only.

Request\json crashes on empty request body #106

Closed
Arteneko opened this issue Sep 11, 2018 · 1 comment
Closed

Request\json crashes on empty request body #106

Arteneko opened this issue Sep 11, 2018 · 1 comment
Assignees
Labels

Comments

@Arteneko
Copy link

If someone tries to do a Siler\Http\Request\json() when the request body is empty, the json_decode will fail (and return null), and the array type enforcing will fail, thus throwing a TypeError.

An example message is:

Fatal error: Uncaught TypeError: Return value of Siler\Http\Request\json() must be of the type array, null returned
@leocavalcante
Copy link
Owner

Thanks for reporting!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants