Skip to content

Commit a117878

Browse files
authored
Merge pull request #34032 from nextcloud/backport/34019/stable24
[stable24] Fix quota type to int
2 parents 986c9c7 + cb8be0c commit a117878

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/private/legacy/OC_Helper.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public static function humanFileSize($bytes) {
9595
/**
9696
* Make a computer file size
9797
* @param string $str file size in human readable format
98-
* @return float|bool a file size in bytes
98+
* @return int|false a file size in bytes
9999
*
100100
* Makes 2kB to 2048.
101101
*
@@ -104,7 +104,7 @@ public static function humanFileSize($bytes) {
104104
public static function computerFileSize($str) {
105105
$str = strtolower($str);
106106
if (is_numeric($str)) {
107-
return (float)$str;
107+
return (int)$str;
108108
}
109109

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

132132
$bytes = round($bytes);
133133

134-
return $bytes;
134+
return (int)$bytes;
135135
}
136136

137137
/**

lib/private/legacy/OC_Util.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ public static function isDefaultExpireDateEnforced() {
158158
* Get the quota of a user
159159
*
160160
* @param IUser|null $user
161-
* @return float Quota bytes
161+
* @return int|\OCP\Files\FileInfo::SPACE_UNLIMITED|false Quota bytes
162162
*/
163163
public static function getUserQuota(?IUser $user) {
164164
if (is_null($user)) {

0 commit comments

Comments
 (0)