diff options
author | Vincent Petry <vincent@nextcloud.com> | 2022-09-12 15:15:31 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-12 15:15:31 +0200 |
commit | 4e5430c81c9ffcef98c086d6ca3d5b8581620000 (patch) | |
tree | ea8dfbb7c6f440ebd859ec29beddf585b8579747 /lib | |
parent | c22d44b82e43e22f36374de674b03acadbc47927 (diff) | |
parent | d61efdff6c53cb8588b1f54e2b096b336b5163b2 (diff) | |
download | nextcloud-server-4e5430c81c9ffcef98c086d6ca3d5b8581620000.tar.gz nextcloud-server-4e5430c81c9ffcef98c086d6ca3d5b8581620000.zip |
Merge pull request #34019 from nextcloud/fix/quota-type
Fix quota type to int
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/legacy/OC_Helper.php | 6 | ||||
-rw-r--r-- | lib/private/legacy/OC_Util.php | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/private/legacy/OC_Helper.php b/lib/private/legacy/OC_Helper.php index 710225c7474..b793029e1f1 100644 --- a/lib/private/legacy/OC_Helper.php +++ b/lib/private/legacy/OC_Helper.php @@ -95,7 +95,7 @@ class OC_Helper { /** * Make a computer file size * @param string $str file size in human readable format - * @return float|false a file size in bytes + * @return int|false a file size in bytes * * Makes 2kB to 2048. * @@ -104,7 +104,7 @@ class OC_Helper { public static function computerFileSize($str) { $str = strtolower($str); if (is_numeric($str)) { - return (float)$str; + return (int)$str; } $bytes_array = [ @@ -131,7 +131,7 @@ class OC_Helper { $bytes = round($bytes); - return $bytes; + return (int)$bytes; } /** diff --git a/lib/private/legacy/OC_Util.php b/lib/private/legacy/OC_Util.php index 516ccc8283c..bf9ed6e29ff 100644 --- a/lib/private/legacy/OC_Util.php +++ b/lib/private/legacy/OC_Util.php @@ -158,7 +158,7 @@ class OC_Util { * Get the quota of a user * * @param IUser|null $user - * @return float|\OCP\Files\FileInfo::SPACE_UNLIMITED|false Quota bytes + * @return int|\OCP\Files\FileInfo::SPACE_UNLIMITED|false Quota bytes */ public static function getUserQuota(?IUser $user) { if (is_null($user)) { |