summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@users.noreply.github.com>2022-10-27 12:10:28 +0200
committerGitHub <noreply@github.com>2022-10-27 12:10:28 +0200
commita117878240a27fe8e400b04e97a5a1d4be35e42c (patch)
tree946565c0ecf7f64e8a56cea74a60708c160a68f3
parent986c9c7fddbd9aa8131497e90c070f880d023429 (diff)
parentcb8be0c6321c1dc21d0fc27ab4a7e0313625aab7 (diff)
downloadnextcloud-server-a117878240a27fe8e400b04e97a5a1d4be35e42c.tar.gz
nextcloud-server-a117878240a27fe8e400b04e97a5a1d4be35e42c.zip
Merge pull request #34032 from nextcloud/backport/34019/stable24
[stable24] Fix quota type to int
-rw-r--r--lib/private/legacy/OC_Helper.php6
-rw-r--r--lib/private/legacy/OC_Util.php2
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/private/legacy/OC_Helper.php b/lib/private/legacy/OC_Helper.php
index 6aa0b582c21..733085c0f3a 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|bool 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 edee23995f1..959e8c02609 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 Quota bytes
+ * @return int|\OCP\Files\FileInfo::SPACE_UNLIMITED|false Quota bytes
*/
public static function getUserQuota(?IUser $user) {
if (is_null($user)) {