diff --git a/lib/Db/TreeMapper.php b/lib/Db/TreeMapper.php index 16354f4ae..ef7267a6d 100644 --- a/lib/Db/TreeMapper.php +++ b/lib/Db/TreeMapper.php @@ -264,7 +264,7 @@ protected function getFindSoftDeletedChildrenQuery(string $type): IQueryBuilder * @psalm-template E as (T is TreeMapper::TYPE_FOLDER ? Folder : (T is TreeMapper::TYPE_BOOKMARK ? Bookmark : SharedFolder)) */ public function findChildren(string $type, int $folderId, ?bool $softDeleted = null): array { - $listSoftDeleted = $softDeleted ?? $this->isEntrySoftDeleted($type, $folderId); + $listSoftDeleted = $softDeleted ?? $this->isEntrySoftDeleted(self::TYPE_FOLDER, $folderId); $qb = $this->selectFromType($type, [], !$listSoftDeleted ? $this->getChildrenQuery[$type] : $this->getSoftDeletedChildrenQuery[$type]); $qb->setParameter('parent_folder', $folderId); return $this->findEntitiesWithType($qb, $type);