diff options
Diffstat (limited to 'apps/dav')
-rw-r--r-- | apps/dav/lib/CalDAV/CalDavBackend.php | 4 | ||||
-rw-r--r-- | apps/dav/lib/CardDAV/CardDavBackend.php | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/apps/dav/lib/CalDAV/CalDavBackend.php b/apps/dav/lib/CalDAV/CalDavBackend.php index 94fe9acf356..b872823d76d 100644 --- a/apps/dav/lib/CalDAV/CalDavBackend.php +++ b/apps/dav/lib/CalDAV/CalDavBackend.php @@ -3139,7 +3139,9 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription $query->select($query->func()->max('id')) ->from('calendarchanges'); - $maxId = $query->executeQuery()->fetchOne(); + $result = $query->executeQuery(); + $maxId = (int) $result->fetchOne(); + $result->closeCursor(); if (!$maxId || $maxId < $keep) { return 0; } 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; } |