OC_Util::isNonUTF8Locale: fix lint error

Signed-off-by: Naoto Kobayashi <naoto.kobayashi4c@gmail.com>
This commit is contained in:
Naoto Kobayashi 2021-11-16 21:05:43 +09:00 committed by backportbot[bot]
parent b01048bafc
commit cbccddcf6e

View file

@ -1297,12 +1297,12 @@ class OC_Util {
* @return bool
*/
private static function isNonUTF8Locale() {
if (function_exists("escapeshellcmd")) {
return ('' === escapeshellcmd('§'));
} else if (function_exists("escapeshellarg")) {
return ('\'\'' === escapeshellarg('§'));
if (function_exists('escapeshellcmd')) {
return '' === escapeshellcmd('§');
} elseif (function_exists('escapeshellarg')) {
return '\'\'' === escapeshellarg('§');
} else {
return (0 === preg_match('/utf-?8/i', setlocale(LC_CTYPE, 0)));
return 0 === preg_match('/utf-?8/i', setlocale(LC_CTYPE, 0));
}
}