From d651d96b178c89dc1e06685017cfcf04e4ac4333 Mon Sep 17 00:00:00 2001 From: Baoshuo Date: Fri, 10 Feb 2023 21:59:22 +0800 Subject: [PATCH] fix: preferred language --- web/app/models/UOJForm.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/app/models/UOJForm.php b/web/app/models/UOJForm.php index 78dabf6..c0cc276 100644 --- a/web/app/models/UOJForm.php +++ b/web/app/models/UOJForm.php @@ -442,11 +442,11 @@ class UOJForm { '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'); } - 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; }