mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-05-16 03:03:42 -04:00
Use Minz_Translate::exists() for language check in createUser() (#7934)
(consistency) Related / follow-up: #7878
This commit is contained in:
@@ -305,8 +305,7 @@ class FreshRSS_user_Controller extends FreshRSS_ActionController {
|
||||
$configPath = '';
|
||||
|
||||
if ($ok) {
|
||||
$languages = Minz_Translate::availableLanguages();
|
||||
if (empty($userConfig['language']) || !in_array($userConfig['language'], $languages, true)) {
|
||||
if (!Minz_Translate::exists(is_string($userConfig['language']) ? $userConfig['language'] : '')) {
|
||||
$userConfig['language'] = Minz_Translate::DEFAULT_LANGUAGE;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user