MessageListByRequestIndexOrUids no need to check array_key_exists

This commit is contained in:
djmaze 2022-01-06 12:51:45 +01:00
parent e3fd72571c
commit 58f98cd69d

View file

@ -785,9 +785,7 @@ class MailClient
$sFetchType = $oRange->UID ? \MailSo\Imap\Enumerations\FetchType::UID : \MailSo\Imap\Enumerations\FetchType::INDEX;
foreach ($aFetchResponse as /* @var $oFetchResponseItem \MailSo\Imap\FetchResponse */ $oFetchResponseItem) {
$id = $oFetchResponseItem->GetFetchValue($sFetchType);
if (\array_key_exists($id, $aCollection)) {
$aCollection[$id] = Message::NewFetchResponseInstance($oMessageCollection->FolderName, $oFetchResponseItem);
}
$aCollection[$id] = Message::NewFetchResponseInstance($oMessageCollection->FolderName, $oFetchResponseItem);
}
$oMessageCollection->exchangeArray(\array_values(\array_filter($aCollection)));
}