diff --git a/lib/private/Files/View.php b/lib/private/Files/View.php index 2516b782ee..8322576c5c 100644 --- a/lib/private/Files/View.php +++ b/lib/private/Files/View.php @@ -1933,7 +1933,7 @@ class View { if ($mount) { try { $storage = $mount->getStorage(); - if ($storage->instanceOfStorage('\OCP\Files\Storage\ILockingStorage')) { + if ($storage && $storage->instanceOfStorage('\OCP\Files\Storage\ILockingStorage')) { $storage->acquireLock( $mount->getInternalPath($absolutePath), $type, @@ -1974,7 +1974,7 @@ class View { if ($mount) { try { $storage = $mount->getStorage(); - if ($storage->instanceOfStorage('\OCP\Files\Storage\ILockingStorage')) { + if ($storage && $storage->instanceOfStorage('\OCP\Files\Storage\ILockingStorage')) { $storage->changeLock( $mount->getInternalPath($absolutePath), $type, diff --git a/lib/private/Share20/Manager.php b/lib/private/Share20/Manager.php index e71b6f9832..df9a06e3a9 100644 --- a/lib/private/Share20/Manager.php +++ b/lib/private/Share20/Manager.php @@ -1430,6 +1430,9 @@ 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) { + return []; + } $owner = $path->getOwner()->getUID(); }