diff options
author | Richard Steinmetz <richard@steinmetz.cloud> | 2022-01-14 19:13:44 +0300 |
---|---|---|
committer | Richard Steinmetz <richard@steinmetz.cloud> | 2022-01-14 19:13:44 +0300 |
commit | 057f157b8f72d2cbef31f92b91f9cbc65715c5c1 (patch) | |
tree | 9241e7406158429160625b2ec7987d2fc6a51d2a /lib/Db | |
parent | 9ed5c3b2332137461d77da8b30cb66b02068a5ee (diff) |
Fix findNewIds() not aggregating results
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
Diffstat (limited to 'lib/Db')
-rw-r--r-- | lib/Db/MessageMapper.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Db/MessageMapper.php b/lib/Db/MessageMapper.php index cd5e7104e..c827049ec 100644 --- a/lib/Db/MessageMapper.php +++ b/lib/Db/MessageMapper.php @@ -1057,13 +1057,13 @@ class MessageMapper extends QBMapper { ) ->orderBy('m.sent_at', 'desc'); - $result = []; + $results = []; foreach (array_chunk($ids, 1000) as $chunk) { $select->setParameter('ids', $chunk, IQueryBuilder::PARAM_INT_ARRAY); - array_merge($this->findIds($select), $result); + $results[] = $this->findIds($select); } - return $result; + return array_merge([], ...$results); } /** |