summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/lib
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2023-02-03 15:48:47 +0100
committerJoas Schilling <coding@schilljs.com>2023-02-07 14:13:39 +0100
commit80071bd8b9ea403668e9317b62c265127c1f339a (patch)
tree4c2bd98ad9ec0bad9f2b2e5688ab1892a8bd50d8 /apps/files_sharing/lib
parent4e969ef8a28c8e71c22f499b738b33e695e4de90 (diff)
downloadnextcloud-server-80071bd8b9ea403668e9317b62c265127c1f339a.tar.gz
nextcloud-server-80071bd8b9ea403668e9317b62c265127c1f339a.zip
fix(sharing): Remove casting to int from INF
Regression from nextcloud/server#35736 INF is a the float INF, casting it to integer will make it 0 Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'apps/files_sharing/lib')
-rw-r--r--apps/files_sharing/lib/DefaultPublicShareTemplateProvider.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/files_sharing/lib/DefaultPublicShareTemplateProvider.php b/apps/files_sharing/lib/DefaultPublicShareTemplateProvider.php
index cb0ba707c0c..9c95428d7b7 100644
--- a/apps/files_sharing/lib/DefaultPublicShareTemplateProvider.php
+++ b/apps/files_sharing/lib/DefaultPublicShareTemplateProvider.php
@@ -139,7 +139,7 @@ class DefaultPublicShareTemplateProvider implements IPublicShareTemplateProvider
if ($freeSpace < FileInfo::SPACE_UNLIMITED) {
$freeSpace = (int)max($freeSpace, 0);
} else {
- $freeSpace = (int)((INF > 0) ? INF: PHP_INT_MAX); // work around https://bugs.php.net/bug.php?id=69188
+ $freeSpace = (INF > 0) ? INF: PHP_INT_MAX; // work around https://bugs.php.net/bug.php?id=69188
}
$hideFileList = !($share->getPermissions() & Constants::PERMISSION_READ);