File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -63,13 +63,19 @@ private function parseData(Context $context): array
63
63
))->setSource (['pointer ' => '/data/type ' ]);
64
64
}
65
65
66
- if (isset ($ body ['data ' ]['attributes ' ]) && !is_array ($ body ['data ' ]['attributes ' ])) {
66
+ if (
67
+ array_key_exists ('attributes ' , $ body ['data ' ]) &&
68
+ !is_array ($ body ['data ' ]['attributes ' ])
69
+ ) {
67
70
throw (new BadRequestException ('data.attributes must be an object ' ))->setSource ([
68
71
'pointer ' => '/data/attributes ' ,
69
72
]);
70
73
}
71
74
72
- if (isset ($ body ['data ' ]['relationships ' ]) && !is_array ($ body ['data ' ]['relationships ' ])) {
75
+ if (
76
+ array_key_exists ('relationships ' , $ body ['data ' ]) &&
77
+ !is_array ($ body ['data ' ]['relationships ' ])
78
+ ) {
73
79
throw (new BadRequestException ('data.relationships must be an object ' ))->setSource ([
74
80
'pointer ' => '/data/relationships ' ,
75
81
]);
You can’t perform that action at this time.
0 commit comments