summaryrefslogtreecommitdiffstats
path: root/lib/private/legacy/OC_Helper.php
diff options
context:
space:
mode:
authorCarl Schwan <carl@carlschwan.eu>2022-09-12 09:26:04 +0200
committerCarl Schwan <carl@carlschwan.eu>2022-09-12 09:26:04 +0200
commitd61efdff6c53cb8588b1f54e2b096b336b5163b2 (patch)
treea94a434dfbc9de60c940850eb45507b59a24bdfe /lib/private/legacy/OC_Helper.php
parent71d0ea84c340ff1e4c7ab85672e1a6a0be673c7d (diff)
downloadnextcloud-server-d61efdff6c53cb8588b1f54e2b096b336b5163b2.tar.gz
nextcloud-server-d61efdff6c53cb8588b1f54e2b096b336b5163b2.zip
Fix quota type to int
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 <carl@carlschwan.eu>
Diffstat (limited to 'lib/private/legacy/OC_Helper.php')
-rw-r--r--lib/private/legacy/OC_Helper.php6
1 files changed, 3 insertions, 3 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;
}
/**