Skip to content

Commit

Permalink
pkp#10690 fixed considering multilingual attr be null when not set at…
Browse files Browse the repository at this point in the history
… all
  • Loading branch information
touhidurabir committed Jan 8, 2025
1 parent 1afaf57 commit 2cc3383
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion classes/core/traits/ModelWithSettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

/**
Expand Down

0 comments on commit 2cc3383

Please sign in to comment.