Skip to content

Commit bfec2d9

Browse files
authored
Merge pull request #49479 from nextcloud/backport/49454/stable29
[stable29] fix: invalid usage of IQueryBuilder::createNamedParameter()
2 parents 7bebbc1 + 699bbd0 commit bfec2d9

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

apps/dav/lib/CalDAV/CalDavBackend.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3539,9 +3539,9 @@ protected function purgeCalendarInvitations(int $calendarId): void {
35393539
// delete all links that match object uid's
35403540
$cmd = $this->db->getQueryBuilder();
35413541
$cmd->delete($this->dbObjectInvitationsTable)
3542-
->where($cmd->expr()->in('uid', $cmd->createNamedParameter('uids'), IQueryBuilder::PARAM_STR_ARRAY));
3543-
foreach (array_chunk($allIds, 1000) as $chunckIds) {
3544-
$cmd->setParameter('uids', $chunckIds, IQueryBuilder::PARAM_INT_ARRAY);
3542+
->where($cmd->expr()->in('uid', $cmd->createParameter('uids'), IQueryBuilder::PARAM_STR_ARRAY));
3543+
foreach (array_chunk($allIds, 1000) as $chunkIds) {
3544+
$cmd->setParameter('uids', $chunkIds, IQueryBuilder::PARAM_STR_ARRAY);
35453545
$cmd->executeStatement();
35463546
}
35473547
}
@@ -3558,7 +3558,7 @@ protected function purgeCalendarInvitations(int $calendarId): void {
35583558
protected function purgeObjectInvitations(string $eventId): void {
35593559
$cmd = $this->db->getQueryBuilder();
35603560
$cmd->delete($this->dbObjectInvitationsTable)
3561-
->where($cmd->expr()->eq('uid', $cmd->createNamedParameter($eventId)));
3561+
->where($cmd->expr()->eq('uid', $cmd->createNamedParameter($eventId, IQueryBuilder::PARAM_STR), IQueryBuilder::PARAM_STR));
35623562
$cmd->executeStatement();
35633563
}
35643564
}

0 commit comments

Comments
 (0)