diff options
author | Joas Schilling <coding@schilljs.com> | 2020-11-05 10:50:53 +0100 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2020-11-09 12:28:17 +0100 |
commit | 8027dcbc6f6b1653f5ebcf04b1862ac1e1f51d32 (patch) | |
tree | 1bf182f477bfbead7b75ae14a8cd0fce5bb38ada /apps/dav/lib/CalDAV | |
parent | 72545ffd07a07f142c9c18b3e4afc9ae1b5c8da2 (diff) | |
download | nextcloud-server-8027dcbc6f6b1653f5ebcf04b1862ac1e1f51d32.tar.gz nextcloud-server-8027dcbc6f6b1653f5ebcf04b1862ac1e1f51d32.zip |
Don't leave cursors open when tests fail
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'apps/dav/lib/CalDAV')
-rw-r--r-- | apps/dav/lib/CalDAV/CalDavBackend.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/apps/dav/lib/CalDAV/CalDavBackend.php b/apps/dav/lib/CalDAV/CalDavBackend.php index 5017891cdc2..ff597bf2455 100644 --- a/apps/dav/lib/CalDAV/CalDavBackend.php +++ b/apps/dav/lib/CalDAV/CalDavBackend.php @@ -248,7 +248,10 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription $query->andWhere($query->expr()->neq('uri', $query->createNamedParameter(BirthdayService::BIRTHDAY_CALENDAR_URI))); } - return (int)$query->execute()->fetchColumn(); + $result = $query->execute(); + $column = (int)$result->fetchColumn(); + $result->closeCursor(); + return $column; } /** @@ -2346,7 +2349,9 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription $query->select('synctoken') ->from($table) ->where($query->expr()->eq('id', $query->createNamedParameter($calendarId))); - $syncToken = (int)$query->execute()->fetchColumn(); + $result = $query->execute(); + $syncToken = (int)$result->fetchColumn(); + $result->closeCursor(); $query = $this->db->getQueryBuilder(); $query->insert('calendarchanges') |