Skip to content

Commit

Permalink
fixup! fix(dav): Reduce CalDAV backend memory footprint
Browse files Browse the repository at this point in the history
Signed-off-by: Christoph Wurst <[email protected]>
  • Loading branch information
ChristophWurst committed Sep 27, 2023
1 parent be3cd6e commit 3b29828
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions apps/dav/lib/CalDAV/CalDavBackend.php
Original file line number Diff line number Diff line change
Expand Up @@ -2660,9 +2660,9 @@ public function getSchedulingObjects($principalUri) {
->where($query->expr()->eq('principaluri', $query->createNamedParameter($principalUri)))
->executeQuery();

$result = [];
$results = [];
while (($row = $result->fetch()) !== false) {

Check failure on line 2664 in apps/dav/lib/CalDAV/CalDavBackend.php

View workflow job for this annotation

GitHub Actions / static-code-analysis

UndefinedVariable

apps/dav/lib/CalDAV/CalDavBackend.php:2664:18: UndefinedVariable: Cannot find referenced variable $result (see https://psalm.dev/024)

Check failure

Code scanning / Psalm

UndefinedVariable Error

Cannot find referenced variable $result
$result[] = [
$results[] = [
'calendardata' => $row['calendardata'],
'uri' => $row['uri'],
'lastmodified' => $row['lastmodified'],
Expand All @@ -2672,7 +2672,7 @@ public function getSchedulingObjects($principalUri) {
}
$stmt->closeCursor();

return $result;
return $results;
}

/**
Expand Down

0 comments on commit 3b29828

Please sign in to comment.