summaryrefslogtreecommitdiffstats
path: root/lib/private/legacy
diff options
context:
space:
mode:
authorNaoto Kobayashi <naoto.kobayashi4c@gmail.com>2021-11-14 08:25:32 +0900
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>2021-11-17 09:01:40 +0000
commit516cc3ba18510d513af860bcf6dc135e0fc3c721 (patch)
treed2c9ab61131ac87d106f088fde47fcf4171413ae /lib/private/legacy
parente9c6de5c79c486ff1af3c1ed853dd1302a758270 (diff)
downloadnextcloud-server-516cc3ba18510d513af860bcf6dc135e0fc3c721.tar.gz
nextcloud-server-516cc3ba18510d513af860bcf6dc135e0fc3c721.zip
Check whether setlocale works only after setlocale
Signed-off-by: Naoto Kobayashi <naoto.kobayashi4c@gmail.com>
Diffstat (limited to 'lib/private/legacy')
-rw-r--r--lib/private/legacy/OC_Util.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/private/legacy/OC_Util.php b/lib/private/legacy/OC_Util.php
index 1a029e9006f..80db477c48b 100644
--- a/lib/private/legacy/OC_Util.php
+++ b/lib/private/legacy/OC_Util.php
@@ -1302,12 +1302,13 @@ class OC_Util {
// Borrowed from \Patchwork\Utf8\Bootup::initLocale
setlocale(LC_ALL, 'C.UTF-8', 'C');
setlocale(LC_CTYPE, 'en_US.UTF-8', 'fr_FR.UTF-8', 'es_ES.UTF-8', 'de_DE.UTF-8', 'ru_RU.UTF-8', 'pt_BR.UTF-8', 'it_IT.UTF-8', 'ja_JP.UTF-8', 'zh_CN.UTF-8', '0');
- }
- // Check again
- if ('' === escapeshellcmd('§')) {
- return false;
+ // Check again
+ if ('' === escapeshellcmd('§')) {
+ return false;
+ }
}
+
return true;
}