Skip to content

Commit

Permalink
fix: close cursor after reading the invitation
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
  • Loading branch information
kesselb committed Aug 3, 2023
1 parent 9a7e2b1 commit 0167e90
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions apps/dav/lib/Controller/InvitationResponseController.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ private function getTokenInformation(string $token) {
->where($query->expr()->eq('token', $query->createNamedParameter($token)));
$stmt = $query->execute();
$row = $stmt->fetch(\PDO::FETCH_ASSOC);
$stmt->closeCursor();

Check notice

Code scanning / Psalm

PossiblyInvalidMethodCall Note

Cannot call method on possible int variable $stmt

if (!$row) {
return null;
Expand Down

0 comments on commit 0167e90

Please sign in to comment.