diff --git a/tinyfilemanager.php b/tinyfilemanager.php index eb5cc20..e39039d 100644 --- a/tinyfilemanager.php +++ b/tinyfilemanager.php @@ -2439,6 +2439,7 @@ function fm_get_size($file) */ function fm_get_filesize($size) { + $size = (float) $size; $units = array('B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'); $power = $size > 0 ? floor(log($size, 1024)) : 0; return sprintf('%s %s', round($size / pow(1024, $power), 2), $units[$power]);