]> source.dussan.org Git - nextcloud-server.git/commitdiff
Add function_exists() check 37873/head
authorGit'Fellow <12234510+solracsf@users.noreply.github.com>
Tue, 7 Mar 2023 16:09:24 +0000 (17:09 +0100)
committerRobin Appelman <robin@icewind.nl>
Fri, 12 May 2023 17:19:05 +0000 (19:19 +0200)
Co-authored-by: Simon L. <szaimen@e.mail.de>
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
lib/private/Files/Storage/Local.php

index 30b581a863d70fdf1313fc940f100ce29bba9efa..a375a5443003d88d496c5dd1412063955606f389 100644 (file)
@@ -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;
                }