We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 3eceaba + e477253 commit c4fa462Copy full SHA for c4fa462
src/Message.php
@@ -53,9 +53,7 @@ public static function fromRawPostData()
53
}
54
55
$data = json_decode(file_get_contents('php://input'), true);
56
- if (JSON_ERROR_NONE !== json_last_error()) {
57
- throw new \InvalidArgumentException('Unable to parse JSON.');
58
- } elseif (!is_array($data)) {
+ if (JSON_ERROR_NONE !== json_last_error() || !is_array($data)) {
59
throw new \RuntimeException('Invalid POST data.');
60
61
0 commit comments