diff --git a/SeedDMS_Core/Core/inc.FileUtils.php b/SeedDMS_Core/Core/inc.FileUtils.php index b72d985b2..ec2e02e4a 100644 --- a/SeedDMS_Core/Core/inc.FileUtils.php +++ b/SeedDMS_Core/Core/inc.FileUtils.php @@ -84,8 +84,9 @@ class SeedDMS_Core_File { */ static function format_filesize($size, $sizes = array('Bytes', 'KiB', 'MiB', 'GiB', 'TiB', 'PiB', 'EiB', 'ZiB', 'YiB')) { /* {{{ */ if ($size == 0) return('0 Bytes'); - /** @noinspection PhpIllegalArrayKeyTypeInspection */ - return (round($size/pow(1024, ($i = floor(log($size, 1024)))), 2) . ' ' . $sizes[$i]); + if ($size == 1) return('1 Byte'); + /** @noinspection PhpIllegalArrayKeyTypeInspection */ + return (round($size/pow(1024, ($i = floor(log($size, 1024)))), 2) . ' ' . $sizes[$i]); } /* }}} */ /**