mirror of
https://github.com/retailcrm/Fetch.git
synced 2024-11-28 21:46:02 +03:00
Merge pull request #96 from gpilla/master
Added check on Message::processAddressObject()
This commit is contained in:
commit
4adad3f685
@ -623,10 +623,13 @@ class Message
|
||||
$outputAddresses = array();
|
||||
if (is_array($addresses))
|
||||
foreach ($addresses as $address) {
|
||||
$currentAddress = array();
|
||||
$currentAddress['address'] = $address->mailbox . '@' . $address->host;
|
||||
if (isset($address->personal))
|
||||
$currentAddress['name'] = $address->personal;
|
||||
if (property_exists($address, 'mailbox') && $address->mailbox != 'undisclosed-recipients') {
|
||||
$currentAddress = array();
|
||||
$currentAddress['address'] = $address->mailbox . '@' . $address->host;
|
||||
if (isset($address->personal)) {
|
||||
$currentAddress['name'] = $address->personal;
|
||||
}
|
||||
}
|
||||
$outputAddresses[] = $currentAddress;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user