Skip to content

Commit 789fa12

Browse files
committed
Fixed undefined resource type key for non-empty array fields upon deleting not-included resources
1 parent c8f21a3 commit 789fa12

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Diff for: 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)