Bugfix: mail Message invalid return type

This commit is contained in:
djmaze 2020-03-16 16:18:29 +01:00
parent b81b36d120
commit 6cf544d3e7

View file

@ -270,7 +270,7 @@ class MailClient
* @throws \MailSo\Net\Exceptions\Exception
* @throws \MailSo\Imap\Exceptions\Exception
*/
public function Message(string $sFolderName, int $iIndex, bool $bIndexIsUid = true, ?\MailSo\Cache\CacheClient $oCacher = null, int $iBodyTextLimit = 0) : void
public function Message(string $sFolderName, int $iIndex, bool $bIndexIsUid = true, ?\MailSo\Cache\CacheClient $oCacher = null, int $iBodyTextLimit = 0) : ?\MailSo\Mail\Message
{
if (!\MailSo\Base\Validator::RangeInt($iIndex, 1))
{
@ -280,7 +280,7 @@ class MailClient
$this->oImapClient->FolderSelect($sFolderName);
$oBodyStructure = null;
$oMessage = false;
$oMessage = null;
$aBodyPeekMimeIndexes = array();
$aSignatureMimeIndexes = array();
@ -349,6 +349,8 @@ class MailClient
$oMessage = \MailSo\Mail\Message::NewFetchResponseInstance(
$sFolderName, $aFetchResponse[0], $oBodyStructure);
}
return $oMessage;
}
/**