Skip to content

Commit 97540ae

Browse files
authored
Merge pull request #49478 from nextcloud/backport/49454/stable28
[stable28] fix: invalid usage of IQueryBuilder::createNamedParameter()
2 parents 62fc990 + 2a1177a commit 97540ae

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
@@ -3529,9 +3529,9 @@ protected function purgeCalendarInvitations(int $calendarId): void {
35293529
// delete all links that match object uid's
35303530
$cmd = $this->db->getQueryBuilder();
35313531
$cmd->delete($this->dbObjectInvitationsTable)
3532-
->where($cmd->expr()->in('uid', $cmd->createNamedParameter('uids'), IQueryBuilder::PARAM_STR_ARRAY));
3533-
foreach (array_chunk($allIds, 1000) as $chunckIds) {
3534-
$cmd->setParameter('uids', $chunckIds, IQueryBuilder::PARAM_INT_ARRAY);
3532+
->where($cmd->expr()->in('uid', $cmd->createParameter('uids'), IQueryBuilder::PARAM_STR_ARRAY));
3533+
foreach (array_chunk($allIds, 1000) as $chunkIds) {
3534+
$cmd->setParameter('uids', $chunkIds, IQueryBuilder::PARAM_STR_ARRAY);
35353535
$cmd->executeStatement();
35363536
}
35373537
}
@@ -3548,7 +3548,7 @@ protected function purgeCalendarInvitations(int $calendarId): void {
35483548
protected function purgeObjectInvitations(string $eventId): void {
35493549
$cmd = $this->db->getQueryBuilder();
35503550
$cmd->delete($this->dbObjectInvitationsTable)
3551-
->where($cmd->expr()->eq('uid', $cmd->createNamedParameter($eventId)));
3551+
->where($cmd->expr()->eq('uid', $cmd->createNamedParameter($eventId, IQueryBuilder::PARAM_STR), IQueryBuilder::PARAM_STR));
35523552
$cmd->executeStatement();
35533553
}
35543554
}

0 commit comments

Comments
 (0)