Skip the replacement of the negative sign for > 0
authorAlexander Ebert <ebert@woltlab.com>
Sun, 27 Feb 2022 13:07:06 +0000 (14:07 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Sun, 27 Feb 2022 13:07:06 +0000 (14:07 +0100)
wcfsetup/install/files/lib/util/StringUtil.class.php

index d63296f9c35444ec17f9f9bda24d5dda7dfc460b..d7636bd2b9ffaa939513c33f513378d069912303 100644 (file)
@@ -200,8 +200,11 @@ final class StringUtil
     {
         $integer = self::addThousandsSeparator($integer);
 
-        // format minus
-        return self::formatNegative($integer);
+        if ($integer < 0) {
+            return self::formatNegative($integer);
+        }
+
+        return $integer;
     }
 
     /**
@@ -651,7 +654,8 @@ final class StringUtil
                 // look for opening tags
                 if (\preg_match('/<[\w]+[^>]*>/s', $tag[0])) {
                     \array_unshift($openTags, $tag[2]);
-                } /**
+                }
+                /**
                  * look for closing tags and check if this tag has a corresponding opening tag
                  * and omit the opening tag if it has been closed already
                  */