Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Check whether setlocale works only after setlocale
Signed-off-by: Naoto Kobayashi <[email protected]>
  • Loading branch information
YoitoFes committed Nov 14, 2021
commit d2eb5aaa6ddbdd3fbbf6ba871f04398038eddcb2
9 changes: 5 additions & 4 deletions lib/private/legacy/OC_Util.php
Original file line number Diff line number Diff line change
Expand Up @@ -1249,12 +1249,13 @@ public static function isSetLocaleWorking() {
// 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;
}

Expand Down