From 2cc338319a522a9ec8fdcd69d04a8551499f77ef Mon Sep 17 00:00:00 2001 From: Touhidur Rahman Date: Thu, 9 Jan 2025 00:14:20 +0600 Subject: [PATCH] pkp/pkp-lib#10690 fixed considering multilingual attr be null when not set at all --- classes/core/traits/ModelWithSettings.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/classes/core/traits/ModelWithSettings.php b/classes/core/traits/ModelWithSettings.php index 36225489f5b..3a77bbeb44c 100644 --- a/classes/core/traits/ModelWithSettings.php +++ b/classes/core/traits/ModelWithSettings.php @@ -141,7 +141,9 @@ public function getLocalizedData(string $data, ?string $locale = null): mixed $multilingualProp = $this->getAttribute($data); - return $this->getBestLocalizedData($multilingualProp, $locale); + return $multilingualProp + ? $this->getBestLocalizedData($multilingualProp, $locale) + : null; } /**