From a3d8a59b00e829b852b0115c14d1de2e6b4d428d Mon Sep 17 00:00:00 2001 From: Marek Bachmann Date: Wed, 30 Nov 2022 04:37:08 +0100 Subject: [PATCH] Correctly output binary prefix values since base 2 is used for conversion --- src/Util/Strings.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Util/Strings.php b/src/Util/Strings.php index e1ec4ae50..0d7bf6691 100644 --- a/src/Util/Strings.php +++ b/src/Util/Strings.php @@ -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);