fix: invalid usage of IQueryBuilder::createNamedParameter()

And fix a typo: chunck -> chunk

Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
pull/49454/head
Richard Steinmetz 2024-11-23 16:41:59 +07:00
parent 2a8b7400ed
commit 23802949c2
No known key found for this signature in database
GPG Key ID: 27137D9E7D273FB2
1 changed files with 3 additions and 3 deletions

@ -3569,9 +3569,9 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
// 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_INT_ARRAY);
$cmd->executeStatement();
}
}