]> source.dussan.org Git - nextcloud-server.git/commitdiff
Patch for master-branch 29383/head
authorJanBartels <j.bartels@arcor.de>
Mon, 18 Oct 2021 19:41:01 +0000 (21:41 +0200)
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>
Fri, 22 Oct 2021 09:35:37 +0000 (09:35 +0000)
lib/private/Share20/Manager.php

index b5e1b944bc52de9c7f78234d81ec78648d841401..84d23e1b0877337a1f036e5bd90f34023008f3dd 100644 (file)
@@ -1658,7 +1658,7 @@ class Manager implements IManager {
                if ($path->getId() !== $userFolder->getId() && !$userFolder->isSubNode($path)) {
                        $nodes = $userFolder->getById($path->getId());
                        $path = array_shift($nodes);
-                       if ($path->getOwner() === null) {
+                       if ($path === null || $path->getOwner() === null) {
                                return [];
                        }
                        $owner = $path->getOwner()->getUID();