fix: preferred language
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Baoshuo Ren 2023-02-10 21:59:22 +08:00
parent e6e7e77e8e
commit d651d96b17
Signed by: baoshuo
GPG Key ID: 00CB9680AB29F51A

View File

@ -442,11 +442,11 @@ class UOJForm {
'always_ok' 'always_ok'
); );
if ($config['preferred_lang'] == null || !isset($languages[$config['preferred_lang']])) { if ($config['preferred_lang'] == null || !isset($config['languages'][$config['preferred_lang']])) {
$preferred_lang = Cookie::get('uoj_preferred_language'); $preferred_lang = Cookie::get('uoj_preferred_language');
} }
if ($config['preferred_lang'] == null || !isset($languages[$config['preferred_lang']])) { if ($config['preferred_lang'] == null || !isset($config['languages'][$config['preferred_lang']])) {
$preferred_lang = UOJLang::$default_preferred_language; $preferred_lang = UOJLang::$default_preferred_language;
} }