From 9936fc04da83de6120409ad6b0cc2d8f55d1a5da Mon Sep 17 00:00:00 2001 From: Clemens Schwaighofer Date: Fri, 9 Dec 2022 16:33:47 +0900 Subject: [PATCH] Convert\Byte class fix string in abs call --- www/lib/CoreLibs/Convert/Byte.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/lib/CoreLibs/Convert/Byte.php b/www/lib/CoreLibs/Convert/Byte.php index d71ae6f6..018c93f9 100644 --- a/www/lib/CoreLibs/Convert/Byte.php +++ b/www/lib/CoreLibs/Convert/Byte.php @@ -65,7 +65,7 @@ class Byte // si or normal $unit = $si ? 1000 : 1024; // always positive - $abs_bytes = $bytes == PHP_INT_MIN ? PHP_INT_MAX : abs($bytes); + $abs_bytes = $bytes == PHP_INT_MIN ? PHP_INT_MAX : abs((float)$bytes); // smaller than unit is always B if ($abs_bytes < $unit) { return $bytes . 'B';