diff options
author | Simon Rettberg | 2020-01-10 15:14:14 +0100 |
---|---|---|
committer | Simon Rettberg | 2020-01-10 15:14:14 +0100 |
commit | 594320adc08685215c8be26e5339b58704475b36 (patch) | |
tree | 55c360fa44dea72b3537886bfdf9e8a4efe9c818 /inc/util.inc.php | |
parent | [locations] Fix $selected array breakage (diff) | |
download | slx-admin-594320adc08685215c8be26e5339b58704475b36.tar.gz slx-admin-594320adc08685215c8be26e5339b58704475b36.tar.xz slx-admin-594320adc08685215c8be26e5339b58704475b36.zip |
[inc/Util] Fix rounding of large (float) values
Diffstat (limited to 'inc/util.inc.php')
-rw-r--r-- | inc/util.inc.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/inc/util.inc.php b/inc/util.inc.php index a15b9faf..bddf0e45 100644 --- a/inc/util.inc.php +++ b/inc/util.inc.php @@ -239,7 +239,7 @@ SADFACE; */ public static function readableFileSize($bytes, $decimals = -1, $shift = 0) { - $bytes = round($bytes); + $bytes = sprintf('%u', $bytes); // round doesn't reliably work for large floats static $sz = array('Byte', 'KiB', 'MiB', 'GiB', 'TiB', 'PiB'); $factor = (int)floor((strlen($bytes) - 1) / 3); if ($factor === 0) { |