diff options
Diffstat (limited to 'lib/private/Files/Cache/StorageGlobal.php')
-rw-r--r-- | lib/private/Files/Cache/StorageGlobal.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/private/Files/Cache/StorageGlobal.php b/lib/private/Files/Cache/StorageGlobal.php index 26a7be24634..8bf37514b8b 100644 --- a/lib/private/Files/Cache/StorageGlobal.php +++ b/lib/private/Files/Cache/StorageGlobal.php @@ -61,6 +61,7 @@ class StorageGlobal { while ($row = $result->fetch()) { $this->cache[$row['id']] = $row; } + $result->closeCursor(); } /** @@ -74,7 +75,10 @@ class StorageGlobal { ->from('storages') ->where($builder->expr()->eq('id', $builder->createNamedParameter($storageId))); - $row = $query->execute()->fetch(); + $result = $query->execute(); + $row = $result->fetch(); + $result->closeCursor(); + if ($row) { $this->cache[$storageId] = $row; } |