aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dav
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@users.noreply.github.com>2023-08-16 15:42:43 +0200
committerGitHub <noreply@github.com>2023-08-16 15:42:43 +0200
commit29407c2764e07fe20865ad568eef35b43e1596b3 (patch)
treed7cba2a5eea9c645db958bbf2185e1bf4e3b9b57 /apps/dav
parent5af9b6cb99313b6572bd669dc1914693c90378b1 (diff)
parentf10972e2fe33c7917a2265e9d42c8b478bc0dc38 (diff)
downloadnextcloud-server-29407c2764e07fe20865ad568eef35b43e1596b3.tar.gz
nextcloud-server-29407c2764e07fe20865ad568eef35b43e1596b3.zip
Merge pull request #39817 from nextcloud/backport/39700/stable27
Diffstat (limited to 'apps/dav')
-rw-r--r--apps/dav/lib/Controller/InvitationResponseController.php3
-rw-r--r--apps/dav/tests/unit/Controller/InvitationResponseControllerTest.php4
2 files changed, 5 insertions, 2 deletions
diff --git a/apps/dav/lib/Controller/InvitationResponseController.php b/apps/dav/lib/Controller/InvitationResponseController.php
index a3607949874..b6013d7b5ad 100644
--- a/apps/dav/lib/Controller/InvitationResponseController.php
+++ b/apps/dav/lib/Controller/InvitationResponseController.php
@@ -166,8 +166,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;
diff --git a/apps/dav/tests/unit/Controller/InvitationResponseControllerTest.php b/apps/dav/tests/unit/Controller/InvitationResponseControllerTest.php
index aac79844aac..2d9132ddccb 100644
--- a/apps/dav/tests/unit/Controller/InvitationResponseControllerTest.php
+++ b/apps/dav/tests/unit/Controller/InvitationResponseControllerTest.php
@@ -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);