add a fallback locale for personal settings page
otherwise if the locale is set to an invalid or no longer existing locale the rendering of the setting page will throw an exception Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
parent
97deaf85b9
commit
db0bb8ae69
1 changed files with 7 additions and 0 deletions
|
@ -251,6 +251,13 @@ class PersonalInfo implements ISettings {
|
|||
return 0 === strpos($localeCode['code'], $userLang);
|
||||
});
|
||||
|
||||
if (!$userLocale) {
|
||||
$userLocale = [
|
||||
'code' => 'en',
|
||||
'name' => 'English'
|
||||
];
|
||||
}
|
||||
|
||||
return [
|
||||
'activelocaleLang' => $userLocaleString,
|
||||
'activelocale' => $userLocale,
|
||||
|
|
Loading…
Reference in a new issue