Merge pull request #19505 from owncloud/returnfloatforquota
always return float, update doc
This commit is contained in:
commit
3098fd0d30
|
@ -274,7 +274,7 @@ class OC_Helper {
|
||||||
/**
|
/**
|
||||||
* Make a computer file size
|
* Make a computer file size
|
||||||
* @param string $str file size in human readable format
|
* @param string $str file size in human readable format
|
||||||
* @return int a file size in bytes
|
* @return float a file size in bytes
|
||||||
*
|
*
|
||||||
* Makes 2kB to 2048.
|
* Makes 2kB to 2048.
|
||||||
*
|
*
|
||||||
|
@ -283,7 +283,7 @@ class OC_Helper {
|
||||||
public static function computerFileSize($str) {
|
public static function computerFileSize($str) {
|
||||||
$str = strtolower($str);
|
$str = strtolower($str);
|
||||||
if (is_numeric($str)) {
|
if (is_numeric($str)) {
|
||||||
return $str;
|
return floatval($str);
|
||||||
}
|
}
|
||||||
|
|
||||||
$bytes_array = array(
|
$bytes_array = array(
|
||||||
|
|
Loading…
Reference in New Issue