From be50bd1b0f959f883f413cd496e5bfd7182c15a5 Mon Sep 17 00:00:00 2001 From: Arthur Schiwon Date: Thu, 11 May 2023 13:17:49 +0200 Subject: fix: ensure searchBySystemTag() is available Signed-off-by: Arthur Schiwon --- apps/dav/lib/Connector/Sabre/FilesReportPlugin.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'apps/dav/lib') diff --git a/apps/dav/lib/Connector/Sabre/FilesReportPlugin.php b/apps/dav/lib/Connector/Sabre/FilesReportPlugin.php index 7a53c34744c..8330934fa75 100644 --- a/apps/dav/lib/Connector/Sabre/FilesReportPlugin.php +++ b/apps/dav/lib/Connector/Sabre/FilesReportPlugin.php @@ -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); -- cgit v1.2.3