diff options
Diffstat (limited to 'lib/private/Files/Config/UserMountCache.php')
-rw-r--r-- | lib/private/Files/Config/UserMountCache.php | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/lib/private/Files/Config/UserMountCache.php b/lib/private/Files/Config/UserMountCache.php index 6fa9cd96bfe..441a4a45326 100644 --- a/lib/private/Files/Config/UserMountCache.php +++ b/lib/private/Files/Config/UserMountCache.php @@ -235,7 +235,9 @@ class UserMountCache implements IUserMountCache { ->innerJoin('m', 'filecache', 'f', $builder->expr()->eq('m.root_id', 'f.fileid')) ->where($builder->expr()->eq('user_id', $builder->createPositionalParameter($user->getUID()))); - $rows = $query->execute()->fetchAll(); + $result = $query->execute(); + $rows = $result->fetchAll(); + $result->closeCursor(); $this->mountsForUsers[$user->getUID()] = array_filter(array_map([$this, 'dbRowToMountInfo'], $rows)); } @@ -258,7 +260,9 @@ class UserMountCache implements IUserMountCache { $query->andWhere($builder->expr()->eq('user_id', $builder->createPositionalParameter($user))); } - $rows = $query->execute()->fetchAll(); + $result = $query->execute(); + $rows = $result->fetchAll(); + $result->closeCursor(); return array_filter(array_map([$this, 'dbRowToMountInfo'], $rows)); } @@ -274,7 +278,9 @@ class UserMountCache implements IUserMountCache { ->innerJoin('m', 'filecache', 'f', $builder->expr()->eq('m.root_id', 'f.fileid')) ->where($builder->expr()->eq('root_id', $builder->createPositionalParameter($rootFileId, IQueryBuilder::PARAM_INT))); - $rows = $query->execute()->fetchAll(); + $result = $query->execute(); + $rows = $result->fetchAll(); + $result->closeCursor(); return array_filter(array_map([$this, 'dbRowToMountInfo'], $rows)); } @@ -291,7 +297,10 @@ class UserMountCache implements IUserMountCache { ->from('filecache') ->where($builder->expr()->eq('fileid', $builder->createNamedParameter($fileId, IQueryBuilder::PARAM_INT))); - $row = $query->execute()->fetch(); + $result = $query->execute(); + $row = $result->fetch(); + $result->closeCursor(); + if (is_array($row)) { $this->cacheInfoCache[$fileId] = [ (int)$row['storage'], |