check for valid json input

pull/445/head
Sascha Nos 4 years ago
parent 6e9768503a
commit f8dd98523c

@ -190,7 +190,7 @@ class Request {
$body = $this->getBody(); $body = $this->getBody();
if ($body != '') { if ($body != '') {
$data = json_decode($body, true); $data = json_decode($body, true);
if ($data != null) { if (is_array($data)) {
$this->data->setData($data); $this->data->setData($data);
} }
} }

Loading…
Cancel
Save