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 authored and backportbot[bot] committed Nov 16, 2021
commit 3b83976c98f5400b26f2104bed95c32ef3606c5a
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