diff options
Diffstat (limited to 'apps/files_trashbin/lib/Trashbin.php')
-rw-r--r-- | apps/files_trashbin/lib/Trashbin.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/apps/files_trashbin/lib/Trashbin.php b/apps/files_trashbin/lib/Trashbin.php index 2ad67e5559a..91f3cec21ee 100644 --- a/apps/files_trashbin/lib/Trashbin.php +++ b/apps/files_trashbin/lib/Trashbin.php @@ -1002,10 +1002,14 @@ class Trashbin { ->andWhere($query->expr()->eq('parent', $query->createNamedParameter($parentId))) ->andWhere($query->expr()->iLike('name', $query->createNamedParameter($pattern))); + $result = $query->execute(); + $entries = $result->fetchAll(); + $result->closeCursor(); + /** @var CacheEntry[] $matches */ $matches = array_map(function (array $data) { return Cache::cacheEntryFromData($data, \OC::$server->getMimeTypeLoader()); - }, $query->execute()->fetchAll()); + }, $entries); foreach ($matches as $ma) { if ($timestamp) { |