From 7ae5d8e1e37dd5f2c1399829de3f13979a2adcc2 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Wed, 15 Feb 2023 19:38:01 +0100 Subject: [PATCH] wip #5718 @0:10 --- src/Files/Files.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Files/Files.php b/src/Files/Files.php index a011080..192ea84 100644 --- a/src/Files/Files.php +++ b/src/Files/Files.php @@ -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'); -- 2.39.5