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.
fromRawPostData
1 parent 3eceaba commit e477253Copy full SHA for e477253
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