Skip to content

Commit

Permalink
Fix quota type to int
Browse files Browse the repository at this point in the history
Change the quota to int from float, since the quota is a number of bits
and a bits can not be splitted.

Fix #34010

Signed-off-by: Carl Schwan <[email protected]>
  • Loading branch information
CarlSchwan authored and backportbot-nextcloud[bot] committed Sep 12, 2022
1 parent 01c0b31 commit c195312
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/private/legacy/OC_Helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public static function humanFileSize($bytes) {
public static function computerFileSize($str) {
$str = strtolower($str);
if (is_numeric($str)) {
return (float)$str;
return (int)$str;
}

$bytes_array = [
Expand All @@ -131,7 +131,7 @@ public static function computerFileSize($str) {

$bytes = round($bytes);

return $bytes;
return (int)$bytes;
}

/**
Expand Down

0 comments on commit c195312

Please sign in to comment.