mirror of
https://github.com/retailcrm/Fetch.git
synced 2024-11-30 22:46: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']);
|
$this->setFileName($parameters['name']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (property_exists($structure, 'bytes')) {
|
||||||
$this->size = $structure->bytes;
|
$this->size = $structure->bytes;
|
||||||
|
}
|
||||||
|
|
||||||
$this->mimeType = Message::typeIdToString($structure->type);
|
$this->mimeType = Message::typeIdToString($structure->type);
|
||||||
|
|
||||||
|
@ -764,7 +764,13 @@ class Message
|
|||||||
foreach ($addresses as $address) {
|
foreach ($addresses as $address) {
|
||||||
if (property_exists($address, 'mailbox') && $address->mailbox != 'undisclosed-recipients') {
|
if (property_exists($address, 'mailbox') && $address->mailbox != 'undisclosed-recipients') {
|
||||||
$currentAddress = array();
|
$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)) {
|
if (isset($address->personal)) {
|
||||||
$currentAddress['name'] = MIME::decode($address->personal, self::$charset);
|
$currentAddress['name'] = MIME::decode($address->personal, self::$charset);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user