diff options
author | Bjoern Schiessle <bjoern@schiessle.org> | 2017-12-01 16:14:51 +0100 |
---|---|---|
committer | Bjoern Schiessle <bjoern@schiessle.org> | 2017-12-01 16:14:51 +0100 |
commit | 2c3d97cc8fadf6b0d68076bea123963b7d40d2e5 (patch) | |
tree | 70a20053d35ed80474bf89fe08cb1801718d2d4c | |
parent | 8b734347b17da5ff2ec7f12e2149aeec785310f2 (diff) | |
download | nextcloud-server-2c3d97cc8fadf6b0d68076bea123963b7d40d2e5.tar.gz nextcloud-server-2c3d97cc8fadf6b0d68076bea123963b7d40d2e5.zip |
check if $defaultLanguage is a valid string before we move on
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
-rw-r--r-- | lib/private/L10N/Factory.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/private/L10N/Factory.php b/lib/private/L10N/Factory.php index 150b36cec44..e277a00e653 100644 --- a/lib/private/L10N/Factory.php +++ b/lib/private/L10N/Factory.php @@ -290,8 +290,9 @@ class Factory implements IFactory { // use formal version of german ("Sie" instead of "Du") if the default // language is set to 'de_DE' if possible - if (strtolower($lang) === 'de' - && strtolower($defaultLanguage) === 'de_de' && + if (is_string($defaultLanguage) && + strtolower($lang) === 'de' && + strtolower($defaultLanguage) === 'de_de' && $this->languageExists($app, 'de_DE') ) { $result = 'de_DE'; |