diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/Helper/TextHelper.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/Helper/TextHelper.php b/app/Helper/TextHelper.php index 654eb171..66583cd1 100644 --- a/app/Helper/TextHelper.php +++ b/app/Helper/TextHelper.php @@ -59,6 +59,10 @@ class TextHelper extends Base */ public function bytes($size, $precision = 2) { + if ($size == 0) { + return 0; + } + $base = log($size) / log(1024); $suffixes = array('', 'k', 'M', 'G', 'T'); |