mirror of
https://github.com/nextcloud/server.git
synced 2026-02-19 02:38:40 -05:00
Merge pull request #39700 from nextcloud/debt/noid/invitation-response-close-cursor
fix: close cursor after reading the invitation
This commit is contained in:
commit
03f5bb68a3
2 changed files with 5 additions and 2 deletions
|
|
@ -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…
Reference in a new issue