]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix: ensure searchBySystemTag() is available
authorArthur Schiwon <blizzz@arthur-schiwon.de>
Thu, 11 May 2023 11:17:49 +0000 (13:17 +0200)
committerArthur Schiwon <blizzz@arthur-schiwon.de>
Wed, 21 Jun 2023 16:19:08 +0000 (18:19 +0200)
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
apps/dav/lib/Connector/Sabre/FilesReportPlugin.php

index 7a53c34744cf55b076d8bb012216309a30c1066c..8330934fa75852f0247cdabacf5bb78bc317c684 100644 (file)
@@ -330,7 +330,9 @@ class FilesReportPlugin extends ServerPlugin {
 
                $nodes = [];
 
-               if (!empty($systemTagIds)) {
+               // type check to ensure searchBySystemTag is available, it is not
+               // exposed in API yet
+               if (!empty($systemTagIds) && $this->userFolder instanceof \OC\Files\Node\Folder) {
                        $tags = $this->tagManager->getTagsByIds($systemTagIds);
                        $tagName = (current($tags))->getName();
                        $nodes = $this->userFolder->searchBySystemTag($tagName, $this->userSession->getUser()->getUID(), $limit ?? 0, $offset ?? 0);