Skip to content

Commit

Permalink
Merge pull request #30052 from nextcloud/backport/30046/stable22
Browse files Browse the repository at this point in the history
[stable22] Close open cursor in the caldav back-end
  • Loading branch information
ChristophWurst authored Dec 3, 2021
2 parents 93794bf + 88f3c5d commit ef7800a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions apps/dav/lib/CalDAV/CalDavBackend.php
Original file line number Diff line number Diff line change
Expand Up @@ -1899,6 +1899,7 @@ public function search(array $calendarInfo, $pattern, array $searchProperties,

$result = $outerQuery->executeQuery();
$calendarObjects = $result->fetchAll();
$result->closeCursor();

return array_map(function ($o) {
$calendarData = Reader::read($o['calendardata']);
Expand Down Expand Up @@ -2613,6 +2614,7 @@ public function getSchedulingObjects($principalUri) {
'size' => (int)$row['size'],
];
}
$stmt->closeCursor();

return $result;
}
Expand Down Expand Up @@ -2992,6 +2994,7 @@ public function deleteAllBirthdayCalendars() {
->executeQuery();

$ids = $result->fetchAll();
$result->closeCursor();
foreach ($ids as $id) {
$this->deleteCalendar(
$id['id'],
Expand Down

0 comments on commit ef7800a

Please sign in to comment.