From 43068be3057075961fc4fb81ebf1ac945e4974a1 Mon Sep 17 00:00:00 2001 From: Martin Eiber Date: Tue, 3 Dec 2024 07:39:55 +0100 Subject: [PATCH] Null check. --- src/DataObject/Data/Adapter/LocalizedFieldsAdapter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/DataObject/Data/Adapter/LocalizedFieldsAdapter.php b/src/DataObject/Data/Adapter/LocalizedFieldsAdapter.php index 60bea682..ac48fd36 100644 --- a/src/DataObject/Data/Adapter/LocalizedFieldsAdapter.php +++ b/src/DataObject/Data/Adapter/LocalizedFieldsAdapter.php @@ -112,7 +112,7 @@ public function normalize( $value->loadLazyData(); $originalValue = $fieldDefinition->normalize($value); - if (empty($originalValue)) { + if ($originalValue === null) { return null; } $languages = array_keys($originalValue);