Skip to content

Commit 72684da

Browse files
authored
Merge pull request #97 from intexsys/fixed-array-undefined-resource-type
Fixed "Undefined index: @type" for resource non-empty array fields
2 parents fd86f75 + 789fa12 commit 72684da

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Helpers/DataIncludedHelper.php

+4
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,10 @@ protected static function removeResourcesNotIncluded(array &$mappings, $parentTy
307307
*/
308308
protected static function isDeleteableIncludedResource(array &$mappings, $parentType, $includeValue)
309309
{
310+
if (!isset($includeValue[Serializer::CLASS_IDENTIFIER_KEY])) {
311+
return true;
312+
}
313+
310314
return !empty($mappings[$parentType])
311315
&& count($mappings[$parentType]->getIncludedResources()) > 0
312316
&& false === in_array($includeValue[Serializer::CLASS_IDENTIFIER_KEY], $mappings[$parentType]->getIncludedResources(), true);

0 commit comments

Comments
 (0)