Skip to content

Commit

Permalink
Merge pull request #49480 from nextcloud/backport/49454/stable30
Browse files Browse the repository at this point in the history
[stable30] fix: invalid usage of IQueryBuilder::createNamedParameter()
  • Loading branch information
st3iny authored Nov 25, 2024
2 parents 0935fd3 + 11f444e commit f8dfa2b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions apps/dav/lib/CalDAV/CalDavBackend.php
Original file line number Diff line number Diff line change
Expand Up @@ -3569,9 +3569,9 @@ protected function purgeCalendarInvitations(int $calendarId): void {
// delete all links that match object uid's
$cmd = $this->db->getQueryBuilder();
$cmd->delete($this->dbObjectInvitationsTable)
->where($cmd->expr()->in('uid', $cmd->createNamedParameter('uids'), IQueryBuilder::PARAM_STR_ARRAY));
foreach (array_chunk($allIds, 1000) as $chunckIds) {
$cmd->setParameter('uids', $chunckIds, IQueryBuilder::PARAM_INT_ARRAY);
->where($cmd->expr()->in('uid', $cmd->createParameter('uids'), IQueryBuilder::PARAM_STR_ARRAY));
foreach (array_chunk($allIds, 1000) as $chunkIds) {
$cmd->setParameter('uids', $chunkIds, IQueryBuilder::PARAM_STR_ARRAY);
$cmd->executeStatement();
}
}
Expand All @@ -3588,7 +3588,7 @@ protected function purgeCalendarInvitations(int $calendarId): void {
protected function purgeObjectInvitations(string $eventId): void {
$cmd = $this->db->getQueryBuilder();
$cmd->delete($this->dbObjectInvitationsTable)
->where($cmd->expr()->eq('uid', $cmd->createNamedParameter($eventId)));
->where($cmd->expr()->eq('uid', $cmd->createNamedParameter($eventId, IQueryBuilder::PARAM_STR), IQueryBuilder::PARAM_STR));
$cmd->executeStatement();
}
}

0 comments on commit f8dfa2b

Please sign in to comment.