Merge pull request #36524 from nextcloud/bugfix/36510/fix-uploading-to-public-shares

fix(sharing): Remove casting to int from INF
This commit is contained in:
Joas Schilling 2023-02-07 15:59:01 +01:00 committed by GitHub
commit 82498bc50f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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);