Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/mail.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2021-05-28 12:07:49 +0300
committerChristoph Wurst <christoph@winzerhof-wurst.at>2021-05-28 12:08:07 +0300
commit31077269234318b54ea31e5931185d14c8dd26b8 (patch)
tree48e27297efcfe1001895b6df51b93b892798b218
parent5e1c84c6f1bde8f1f42f7ec76ee1a67e9da36561 (diff)
Fix parameter type of message IDs
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
-rw-r--r--lib/Db/TagMapper.php4
-rw-r--r--tests/Integration/IMAP/MessageMapperTest.php2
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/Db/TagMapper.php b/lib/Db/TagMapper.php
index c12ae0d59..3c626b9e3 100644
--- a/lib/Db/TagMapper.php
+++ b/lib/Db/TagMapper.php
@@ -140,12 +140,12 @@ class TagMapper extends QBMapper {
->from($this->getTableName(), 't')
->join('t', 'mail_message_tags', 'mt', $qb->expr()->eq('t.id', 'mt.tag_id', IQueryBuilder::PARAM_INT))
->where(
- $qb->expr()->in('mt.imap_message_id', $qb->createParameter('ids')),
+ $qb->expr()->in('mt.imap_message_id', $qb->createParameter('ids'), IQueryBuilder::PARAM_STR_ARRAY),
$qb->expr()->eq('t.user_id', $qb->createNamedParameter($userId, IQueryBuilder::PARAM_STR))
);
foreach (array_chunk($ids, 1000) as $chunk) {
- $tagsQuery->setParameter('ids', $chunk, IQueryBuilder::PARAM_INT_ARRAY);
+ $tagsQuery->setParameter('ids', $chunk, IQueryBuilder::PARAM_STR_ARRAY);
$queryResult = $tagsQuery->execute();
while (($row = $queryResult->fetch()) !== false) {
diff --git a/tests/Integration/IMAP/MessageMapperTest.php b/tests/Integration/IMAP/MessageMapperTest.php
index 2cee9f416..20e93e688 100644
--- a/tests/Integration/IMAP/MessageMapperTest.php
+++ b/tests/Integration/IMAP/MessageMapperTest.php
@@ -54,7 +54,7 @@ class MessageMapperTest extends TestCase {
$account = $this->createTestAccount();
/** @var SyncService $syncService */
$syncService = OC::$server->get(SyncService::class);
- /** @var ImapMessageMapper $messageMapper */
+ /** @var ImapMessageMapper $imapMessageMapper */
$imapMessageMapper = OC::$server->get(ImapMessageMapper::class);
/** @var MessageMapper $messageMapper */
$messageMapper = OC::$server->get(MessageMapper::class);