If there is no content don't error
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
parent
459ae6d94a
commit
9717cdfb9e
|
@ -432,7 +432,7 @@ class Request implements \ArrayAccess, \Countable, IRequest {
|
|||
// 'application/json' must be decoded manually.
|
||||
if (strpos($this->getHeader('Content-Type'), 'application/json') !== false) {
|
||||
$params = json_decode(file_get_contents($this->inputStream), true);
|
||||
if(count($params) > 0) {
|
||||
if($params !== null && count($params) > 0) {
|
||||
$this->items['params'] = $params;
|
||||
if($this->method === 'POST') {
|
||||
$this->items['post'] = $params;
|
||||
|
|
Loading…
Reference in New Issue