summaryrefslogtreecommitdiffstats
path: root/lib/private/L10N
diff options
context:
space:
mode:
authorBjoern Schiessle <bjoern@schiessle.org>2017-12-01 16:14:51 +0100
committerBjoern Schiessle <bjoern@schiessle.org>2017-12-01 16:14:51 +0100
commit2c3d97cc8fadf6b0d68076bea123963b7d40d2e5 (patch)
tree70a20053d35ed80474bf89fe08cb1801718d2d4c /lib/private/L10N
parent8b734347b17da5ff2ec7f12e2149aeec785310f2 (diff)
downloadnextcloud-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>
Diffstat (limited to 'lib/private/L10N')
-rw-r--r--lib/private/L10N/Factory.php5
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';