From 66a408c8368fffca6d73ded40d9b725685b89245 Mon Sep 17 00:00:00 2001 From: Bartek Date: Fri, 28 Aug 2020 13:06:32 +0200 Subject: [PATCH] EZP-31811: Fixed deleted relation fieldtypes (#101) --- eZ/Publish/Core/Repository/Helper/RelationProcessor.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eZ/Publish/Core/Repository/Helper/RelationProcessor.php b/eZ/Publish/Core/Repository/Helper/RelationProcessor.php index be6291b94b..a629dacb31 100644 --- a/eZ/Publish/Core/Repository/Helper/RelationProcessor.php +++ b/eZ/Publish/Core/Repository/Helper/RelationProcessor.php @@ -116,7 +116,7 @@ public function processFieldRelations( // Map existing relations for easier handling $mappedRelations = []; foreach ($existingRelations as $relation) { - if ($relation->type & Relation::FIELD) { + if ($relation->type & Relation::FIELD && null !== $relation->sourceFieldDefinitionIdentifier) { $fieldDefinition = $contentType->getFieldDefinition($relation->sourceFieldDefinitionIdentifier); if ($fieldDefinition !== null) { $mappedRelations[Relation::FIELD][$fieldDefinition->id][$relation->destinationContentInfo->id] = $relation;