aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dav/lib/CardDAV/CardDavBackend.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/dav/lib/CardDAV/CardDavBackend.php')
-rw-r--r--apps/dav/lib/CardDAV/CardDavBackend.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/dav/lib/CardDAV/CardDavBackend.php b/apps/dav/lib/CardDAV/CardDavBackend.php
index 1be1ce3f18f..045ad4d1385 100644
--- a/apps/dav/lib/CardDAV/CardDavBackend.php
+++ b/apps/dav/lib/CardDAV/CardDavBackend.php
@@ -1404,7 +1404,9 @@ class CardDavBackend implements BackendInterface, SyncSupport {
$query->select($query->func()->max('id'))
->from('addressbookchanges');
- $maxId = $query->executeQuery()->fetchOne();
+ $result = $query->executeQuery();
+ $maxId = (int) $result->fetchOne();
+ $result->closeCursor();
if (!$maxId || $maxId < $keep) {
return 0;
}