]> git.mxchange.org Git - friendica.git/commitdiff
Correctly output binary prefix values since base 2 is used for conversion
authorMarek Bachmann <marek.bachmann@comtec.eecs.uni-kassel.de>
Wed, 30 Nov 2022 03:37:08 +0000 (04:37 +0100)
committerMarek Bachmann <marek.bachmann@comtec.eecs.uni-kassel.de>
Wed, 30 Nov 2022 03:37:08 +0000 (04:37 +0100)
src/Util/Strings.php

index e1ec4ae50b456b468223e4b9a5a07e53f44a161c..0d7bf66911d0eec156de1fb09c2e9c1f0dfc1630 100644 (file)
@@ -225,7 +225,7 @@ class Strings
                        return INF;
                }
 
-               $units = ['B', 'KB', 'MB', 'GB', 'TB'];
+               $units = ['B', 'KiB', 'MiB', 'GiB', 'TiB'];
                $bytes = max($bytes, 0);
                $pow = floor(($bytes ? log($bytes) : 0) / log(1024));
                $pow = min($pow, count($units) - 1);