summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent Petry <vincent@nextcloud.com>2021-11-19 17:14:08 +0100
committerGitHub <noreply@github.com>2021-11-19 17:14:08 +0100
commit289624b79ec77370989f3041a708f13043a54920 (patch)
tree9c77efd586c5eb61d950878497f22cbc63999c54
parent5957e3df6106b7ff88c999f0a07b579ee228017d (diff)
parent152e2bfdaa2cc860b3fb456d6a9bc675c00e6b39 (diff)
downloadnextcloud-server-289624b79ec77370989f3041a708f13043a54920.tar.gz
nextcloud-server-289624b79ec77370989f3041a708f13043a54920.zip
Merge pull request #29758 from nextcloud/disk_free_space-fix-php8
Check for `disk_free_space`
-rw-r--r--lib/private/Files/Storage/Local.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/Files/Storage/Local.php b/lib/private/Files/Storage/Local.php
index 13f1a6f2ec4..6406beaeebc 100644
--- a/lib/private/Files/Storage/Local.php
+++ b/lib/private/Files/Storage/Local.php
@@ -378,7 +378,7 @@ class Local extends \OC\Files\Storage\Common {
// disk_free_space doesn't work on files
$sourcePath = dirname($sourcePath);
}
- $space = @disk_free_space($sourcePath);
+ $space = function_exists('disk_free_space') ? disk_free_space($sourcePath) : false;
if ($space === false || is_null($space)) {
return \OCP\Files\FileInfo::SPACE_UNKNOWN;
}