Correctly output binary prefix values since base 2 is used for conversion
This commit is contained in:
parent
75b01f669a
commit
a3d8a59b00
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue