diff --git a/lib/private/legacy/OC_Helper.php b/lib/private/legacy/OC_Helper.php index 3b409fd1d0406..e2bd7de2fbac3 100644 --- a/lib/private/legacy/OC_Helper.php +++ b/lib/private/legacy/OC_Helper.php @@ -95,7 +95,7 @@ public static function humanFileSize($bytes) { /** * Make a computer file size * @param string $str file size in human readable format - * @return int|false a file size in bytes + * @return float|false a file size in bytes * * Makes 2kB to 2048. * @@ -104,7 +104,7 @@ public static function humanFileSize($bytes) { public static function computerFileSize($str) { $str = strtolower($str); if (is_numeric($str)) { - return (int)$str; + return (float)$str; } $bytes_array = [ @@ -131,7 +131,7 @@ public static function computerFileSize($str) { $bytes = round($bytes); - return (int)$bytes; + return $bytes; } /** diff --git a/lib/private/legacy/OC_Util.php b/lib/private/legacy/OC_Util.php index 429f7ed5d05ab..fcfc40dc2ccd0 100644 --- a/lib/private/legacy/OC_Util.php +++ b/lib/private/legacy/OC_Util.php @@ -159,7 +159,7 @@ public static function isDefaultExpireDateEnforced() { * Get the quota of a user * * @param IUser|null $user - * @return int|\OCP\Files\FileInfo::SPACE_UNLIMITED|false Quota bytes + * @return float|\OCP\Files\FileInfo::SPACE_UNLIMITED|false Quota bytes */ public static function getUserQuota(?IUser $user) { if (is_null($user)) {