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();
|
$outputAddresses = array();
|
||||||
if (is_array($addresses))
|
if (is_array($addresses))
|
||||||
foreach ($addresses as $address) {
|
foreach ($addresses as $address) {
|
||||||
$currentAddress = array();
|
if (property_exists($address, 'mailbox') && $address->mailbox != 'undisclosed-recipients') {
|
||||||
$currentAddress['address'] = $address->mailbox . '@' . $address->host;
|
$currentAddress = array();
|
||||||
if (isset($address->personal))
|
$currentAddress['address'] = $address->mailbox . '@' . $address->host;
|
||||||
$currentAddress['name'] = $address->personal;
|
if (isset($address->personal)) {
|
||||||
|
$currentAddress['name'] = $address->personal;
|
||||||
|
}
|
||||||
|
}
|
||||||
$outputAddresses[] = $currentAddress;
|
$outputAddresses[] = $currentAddress;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user