Skip to content
This repository has been archived by the owner on Dec 27, 2023. It is now read-only.

Commit

Permalink
fix(Felamimail/Message/Send): prevent issue with missing index
Browse files Browse the repository at this point in the history
  • Loading branch information
pschuele committed Feb 16, 2023
1 parent b68e6b9 commit 067b254
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tine20/Felamimail/Controller/Message/Send.php
Expand Up @@ -353,9 +353,9 @@ protected function _sendMailViaTransport(Zend_Mail $_mail,
}

if (isset($_message['sent_copy_folder']) && sizeof($_message['sent_copy_folder']) > 0) {
$folders = $this->_saveMessageCopyToImapFolders($transport, $_account, $_message);
if ($folders[0]) {
$this->_fileSentMessage($_message, $folders[0]);
$fileMessageInFolder = $this->_saveMessageCopyToImapFolders($transport, $_account, $_message)->getFirstRecord();
if ($fileMessageInFolder) {
$this->_fileSentMessage($_message, $fileMessageInFolder);
}
}
}
Expand Down Expand Up @@ -473,6 +473,7 @@ protected function _fileSentMessage($_message, $_sentFolder)
* @param Felamimail_Model_Message $_message
* @throws Felamimail_Exception_IMAPInvalidCredentials
* @throws Zend_Mail_Transport_Exception
* @return Tinebase_Record_RecordSet
*/
protected function _saveMessageCopyToImapFolders(Felamimail_Transport_Interface $_transport, Felamimail_Model_Account $_account, Felamimail_Model_Message $_message)
{
Expand Down

0 comments on commit 067b254

Please sign in to comment.