Skip to content

Commit

Permalink
Avoid php error when host is missing
Browse files Browse the repository at this point in the history
resolves tedious#181
  • Loading branch information
Christian Bartels committed Aug 10, 2017
1 parent 9a1b0eb commit 1dd1ff8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Fetch/Message.php
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,7 @@ protected function processAddressObject($addresses)
foreach ($addresses as $address) {
if (property_exists($address, 'mailbox') && $address->mailbox != 'undisclosed-recipients') {
$currentAddress = array();
$currentAddress['address'] = $address->mailbox . '@' . $address->host;
$currentAddress['address'] = $address->mailbox . (property_exists($address, 'host') ? '@' . $address->host : '');
if (isset($address->personal)) {
$currentAddress['name'] = MIME::decode($address->personal, self::$charset);
}
Expand Down

0 comments on commit 1dd1ff8

Please sign in to comment.