mirror of
https://github.com/retailcrm/Fetch.git
synced 2024-11-24 03:56:02 +03:00
fixes undefined property
This commit is contained in:
parent
2f87688e3d
commit
bcaa835898
@ -134,7 +134,9 @@ class Attachment
|
||||
$this->setFileName($parameters['name']);
|
||||
}
|
||||
|
||||
if (property_exists($structure, 'bytes')) {
|
||||
$this->size = $structure->bytes;
|
||||
}
|
||||
|
||||
$this->mimeType = Message::typeIdToString($structure->type);
|
||||
|
||||
|
@ -764,7 +764,13 @@ class Message
|
||||
foreach ($addresses as $address) {
|
||||
if (property_exists($address, 'mailbox') && $address->mailbox != 'undisclosed-recipients') {
|
||||
$currentAddress = array();
|
||||
$currentAddress['address'] = $address->mailbox . '@' . $address->host;
|
||||
|
||||
$host = '';
|
||||
if (property_exists($address, 'host')) {
|
||||
$host = $address->host;
|
||||
}
|
||||
|
||||
$currentAddress['address'] = $address->mailbox . '@' . $host;
|
||||
if (isset($address->personal)) {
|
||||
$currentAddress['name'] = MIME::decode($address->personal, self::$charset);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user