diff options
author | Vincent Petry <vincent@nextcloud.com> | 2021-11-19 17:14:08 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-19 17:14:08 +0100 |
commit | 289624b79ec77370989f3041a708f13043a54920 (patch) | |
tree | 9c77efd586c5eb61d950878497f22cbc63999c54 | |
parent | 5957e3df6106b7ff88c999f0a07b579ee228017d (diff) | |
parent | 152e2bfdaa2cc860b3fb456d6a9bc675c00e6b39 (diff) | |
download | nextcloud-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.php | 2 |
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; } |