Skip to content

Commit c22a20f

Browse files
small fix
1 parent 684e701 commit c22a20f

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/BodyStructure.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ protected static function processSubPartAsMessage($item)
308308
];
309309

310310
foreach ($item[8] as $itemPart) {
311-
if ($itemPart[2] == 'ALTERNATIVE') {
311+
if (isset($itemPart[2]) && $itemPart[2] == 'ALTERNATIVE') {
312312
$message->parts[] = self::extractPartAsAlternative($itemPart);
313313
continue;
314314
}

src/Functions.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public static function getHostFromMailbox($mailbox)
3030
{
3131
$mailboxParts = is_array($mailbox) ? $mailbox : self::parseMailboxString($mailbox);
3232

33-
return $mailboxParts['host'];
33+
return @$mailboxParts['host'];
3434
}
3535

3636
public static function getSslModeFromMailbox($mailbox)

src/HeaderInfo.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ protected static function parseAddressList($address, $defaultHost)
9393
foreach ($addressList as $objectEntry) {
9494
$addressEntry = (object) [
9595
'personal' => $objectEntry->personal ?? null,
96-
'mailbox' => $objectEntry->mailbox,
96+
'mailbox' => @$objectEntry->mailbox,
9797
'host' => @$objectEntry->host,
9898
];
9999

0 commit comments

Comments
 (0)