mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
Add function_exists() check
Co-authored-by: Simon L. <szaimen@e.mail.de> Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
This commit is contained in:
parent
9ac065fb92
commit
28231ae515
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue