]> _ Git - cubist_util.git/commitdiff
wip #5718 @0:10
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 15 Feb 2023 18:38:01 +0000 (19:38 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 15 Feb 2023 18:38:01 +0000 (19:38 +0100)
src/Files/Files.php

index a011080b3ba98bb4d5a10f03eed8e5694fa31f03..192ea845b3facbd64cc0d33ebc6158b337fbac3a 100644 (file)
@@ -55,6 +55,10 @@ class Files
 
     public static function humanReadableSize($size, $precision = 2)
     {
+        if ($size == 0) {
+            return 0;
+        }
+
         $base = log($size) / log(1024);
         $suffixes = array('', 'k', 'M', 'G', 'T');