summaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorGit'Fellow <12234510+solracsf@users.noreply.github.com>2023-03-07 17:09:24 +0100
committerGitHub <noreply@github.com>2023-03-07 17:09:24 +0100
commit28231ae51585270bb825b71413aa25d357400fa0 (patch)
treeede5755a5cfacadc76663bc0bce654fa70d0f379 /lib/private
parent9ac065fb923d0918568eaba375f0669325b08443 (diff)
downloadnextcloud-server-28231ae51585270bb825b71413aa25d357400fa0.tar.gz
nextcloud-server-28231ae51585270bb825b71413aa25d357400fa0.zip
Add function_exists() check
Co-authored-by: Simon L. <szaimen@e.mail.de> Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
Diffstat (limited to 'lib/private')
-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 2f1248a79b2..2a07304358a 100644
--- a/lib/private/Files/Storage/Local.php
+++ b/lib/private/Files/Storage/Local.php
@@ -418,7 +418,7 @@ class Local extends \OC\Files\Storage\Common {
// disk_free_space doesn't work on files
$sourcePath = dirname($sourcePath);
}
- $space = is_dir($sourcePath) ? disk_free_space($sourcePath) : false;
+ $space = (function_exists('disk_free_space') && is_dir($sourcePath)) ? disk_free_space($sourcePath) : false;
if ($space === false || is_null($space)) {
return \OCP\Files\FileInfo::SPACE_UNKNOWN;
}