check for valid json input

pull/439/head
Masroor Ehsan 3 years ago
parent 132657ab58
commit b7abb4945f

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

Loading…
Cancel
Save