From d0a9788c6a45e6b45b38c08921d2c6a634cb2bb9 Mon Sep 17 00:00:00 2001 From: barw4 Date: Wed, 26 Aug 2020 13:25:01 +0200 Subject: [PATCH] EZP-31811: Fixed deleted relation fieldtypes --- 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;