diff --git a/Civi/Core/Locale.php b/Civi/Core/Locale.php index cb3571e9adf9..cd5d711821cd 100644 --- a/Civi/Core/Locale.php +++ b/Civi/Core/Locale.php @@ -245,7 +245,7 @@ public function apply(): Locale { public function renegotiate(array $availableLocales): ?Locale { $fallbacks = array_merge( // We'd like to stay in the active locale (or something closely related) - static::getLocalePrecedence($this->nominal), + ($this->nominal ? static::getLocalePrecedence($this->nominal) : []), // If we can't, then try the system locale (or something closely related) static::getLocalePrecedence(\Civi::settings()->get('lcMessages')) );