Merge pull request #39700 from nextcloud/debt/noid/invitation-response-close-cursor

fix: close cursor after reading the invitation
pull/39820/head
Joas Schilling 9 months ago committed by GitHub
commit 03f5bb68a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -169,8 +169,9 @@ class InvitationResponseController extends Controller {
$query->select('*')
->from('calendar_invitations')
->where($query->expr()->eq('token', $query->createNamedParameter($token)));
$stmt = $query->execute();
$stmt = $query->executeQuery();
$row = $stmt->fetch(\PDO::FETCH_ASSOC);
$stmt->closeCursor();
if (!$row) {
return null;

@ -465,6 +465,8 @@ EOF;
->method('fetch')
->with(\PDO::FETCH_ASSOC)
->willReturn($return);
$stmt->expects($this->once())
->method('closeCursor');
$function = 'functionToken';
$expr->expects($this->once())
@ -490,7 +492,7 @@ EOF;
->with($function)
->willReturn($queryBuilder);
$queryBuilder->expects($this->once())
->method('execute')
->method('executeQuery')
->with()
->willReturn($stmt);

Loading…
Cancel
Save