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.
1 parent 45c60f4 commit 74cd6e5Copy full SHA for 74cd6e5
src/Http/Requests/ResourceRequest.php
@@ -204,7 +204,7 @@ public function document(): array
204
{
205
$document = $this->json()->all();
206
207
- if (!is_array($document) || !isset($document['data']) || !is_array($document['data'])) {
+ if (!is_array($document) || !array_key_exists('data', $document) || !(is_array($document['data']) || is_null($document['data']))) {
208
throw new LogicException('Expecting JSON API specification compliance to have been run.');
209
}
210
0 commit comments