From e72fd7549f761058fed8ba9340572d54fab844d6 Mon Sep 17 00:00:00 2001 From: Nattfarinn Date: Wed, 7 Aug 2024 09:59:40 +0200 Subject: [PATCH] fix: Replace null comparison with isset --- eZ/Publish/Core/Persistence/Legacy/Content/FieldHandler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eZ/Publish/Core/Persistence/Legacy/Content/FieldHandler.php b/eZ/Publish/Core/Persistence/Legacy/Content/FieldHandler.php index 3c16602c2b..5bb2dc0460 100644 --- a/eZ/Publish/Core/Persistence/Legacy/Content/FieldHandler.php +++ b/eZ/Publish/Core/Persistence/Legacy/Content/FieldHandler.php @@ -332,7 +332,7 @@ public function updateFields(Content $content, UpdateStruct $updateStruct, Type if (isset($updateFieldMap[$fieldDefinition->id][$languageCode])) { $field = clone $updateFieldMap[$fieldDefinition->id][$languageCode]; $field->versionNo = $content->versionInfo->versionNo; - if (null !== $field->id && array_key_exists($field->languageCode, $existingLanguageCodes)) { + if (isset($field->id) && array_key_exists($field->languageCode, $existingLanguageCodes)) { $this->updateField($field, $content); $updatedFields[$fieldDefinition->id][$languageCode] = $field; } else {