diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2021-04-23 12:47:39 +0300 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2021-04-23 15:35:02 +0300 |
commit | 323f95693cbe1721aec5c503cfb717c51575f141 (patch) | |
tree | a9fd22275276243b756abbba18c389830a8882c0 /apps/dav | |
parent | 72a4f21efe02915e569693c080dcb04a1eeaf012 (diff) |
Close open cursors
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'apps/dav')
-rw-r--r-- | apps/dav/lib/CalDAV/CalDavBackend.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/apps/dav/lib/CalDAV/CalDavBackend.php b/apps/dav/lib/CalDAV/CalDavBackend.php index ba3daf8858c..15dabdbb14e 100644 --- a/apps/dav/lib/CalDAV/CalDavBackend.php +++ b/apps/dav/lib/CalDAV/CalDavBackend.php @@ -1894,8 +1894,9 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription ->andWhere($query->expr()->eq('co.uid', $query->createNamedParameter($uid))); $stmt = $query->executeQuery(); - - if ($row = $stmt->fetch()) { + $row = $stmt->fetch(); + $stmt->closeCursor(); + if ($row) { return $row['calendaruri'] . '/' . $row['objecturi']; } @@ -2000,7 +2001,6 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription // Fetching all changes $stmt = $qb->executeQuery(); - $changes = []; // This loop ensures that any duplicates are overwritten, only the @@ -2008,6 +2008,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription while ($row = $stmt->fetch()) { $changes[$row['uri']] = $row['operation']; } + $stmt->closeCursor(); foreach ($changes as $uri => $operation) { switch ($operation) { @@ -2035,6 +2036,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription ); $stmt = $qb->executeQuery(); $result['added'] = $stmt->fetchAll(\PDO::FETCH_COLUMN); + $stmt->closeCursor(); } return $result; } |