Bug fix in Basic class string to bytes convert
This commit is contained in:
1 parent
a6918bac6f
commit
98bf11e0c9
3 files changed
+17
-2
No files matched your search
@@ -1512,7 +1512,7 @@ class Basic
|
||||
// labels in order of size
|
||||
$labels = array('B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB');
|
||||
// calc file size, round down too two digits, add label based max change
|
||||
return round($number / pow(1024, ($i = floor(log($number, 1024)))), 2).($space ? ' ' : '').(isset($labels[(int)$i]) ? $labels[(int)$i] : '>EB');
|
||||
return round($number / pow(1024, ($i = floor(log((float)$number, 1024)))), 2).($space ? ' ' : '').(isset($labels[(int)$i]) ? $labels[(int)$i] : '>EB');
|
||||
}
|
||||
return (string)$number;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user