mirror of
https://github.com/retailcrm/Fetch.git
synced 2024-11-22 03:06:02 +03:00
Merge pull request #8 from iyzoer/fixes-undefined-index
fixes undefined property
This commit is contained in:
commit
521f7bcff7
@ -134,7 +134,9 @@ class Attachment
|
|||||||
$this->setFileName($parameters['name']);
|
$this->setFileName($parameters['name']);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->size = $structure->bytes;
|
if (property_exists($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