Skip to content

Commit 4eb77ff

Browse files
committed
fix(sharing): Remove casting to int from INF
Regression from #35736 INF is a the float INF, casting it to integer will make it 0 Signed-off-by: Joas Schilling <coding@schilljs.com>
1 parent 1fed799 commit 4eb77ff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

apps/files_sharing/lib/DefaultPublicShareTemplateProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ public function renderPage(IShare $share, string $token, string $path): Template
139139
if ($freeSpace < FileInfo::SPACE_UNLIMITED) {
140140
$freeSpace = (int)max($freeSpace, 0);
141141
} else {
142-
$freeSpace = (int)((INF > 0) ? INF: PHP_INT_MAX); // work around https://bugs.php.net/bug.php?id=69188
142+
$freeSpace = (INF > 0) ? INF: PHP_INT_MAX; // work around https://bugs.php.net/bug.php?id=69188
143143
}
144144

145145
$hideFileList = !($share->getPermissions() & Constants::PERMISSION_READ);

0 commit comments

Comments
 (0)