]> source.dussan.org Git - nextcloud-server.git/commitdiff
OC_Util::isNonUTF8Locale: fix lint error 29742/head
authorNaoto Kobayashi <naoto.kobayashi4c@gmail.com>
Tue, 16 Nov 2021 12:05:43 +0000 (21:05 +0900)
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>
Wed, 17 Nov 2021 09:01:41 +0000 (09:01 +0000)
Signed-off-by: Naoto Kobayashi <naoto.kobayashi4c@gmail.com>
lib/private/legacy/OC_Util.php

index e476c449f9e3f68af20eb250b1b5bd20c82ff81b..64a1083805d629832b57f126a49494fe62022d9f 100644 (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));
                }
        }