diff options
Diffstat (limited to 'settings/ajax/setlanguage.php')
-rw-r--r-- | settings/ajax/setlanguage.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/settings/ajax/setlanguage.php b/settings/ajax/setlanguage.php index a83212927bf..0ec05534e6b 100644 --- a/settings/ajax/setlanguage.php +++ b/settings/ajax/setlanguage.php @@ -9,7 +9,7 @@ OCP\JSON::callCheck(); // Get data if( isset( $_POST['lang'] ) ) { $languageCodes=OC_L10N::findAvailableLanguages(); - $lang=$_POST['lang']; + $lang = (string)$_POST['lang']; if(array_search($lang, $languageCodes) or $lang === 'en') { \OC::$server->getConfig()->setUserValue( OC_User::getUser(), 'core', 'lang', $lang ); OC_JSON::success(array("data" => array( "message" => $l->t("Language changed") ))); |