From: Morris Jobke Date: Fri, 31 May 2019 21:16:06 +0000 (+0200) Subject: Fix full text search for groupfolders X-Git-Tag: v15.0.9RC1~11^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=refs%2Fpull%2F16083%2Fhead;p=nextcloud-server.git Fix full text search for groupfolders Signed-off-by: Morris Jobke --- diff --git a/lib/private/Files/View.php b/lib/private/Files/View.php index 990bd07e59c..b7027d8d753 100644 --- a/lib/private/Files/View.php +++ b/lib/private/Files/View.php @@ -1925,7 +1925,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, @@ -1966,7 +1966,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 73fc04c7cc9..8ca6185d08c 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(); }