diff --git a/src/Core/Message/Attachment.php b/src/Core/Message/Attachment.php index a6f0e76..f1d7916 100644 --- a/src/Core/Message/Attachment.php +++ b/src/Core/Message/Attachment.php @@ -226,7 +226,7 @@ class Attachment $this->attachment['ifdparameters'] = (isset($this->part->ifdparameters)) ? $this->part->ifdparameters : false; $this->attachment['ifparameters'] = (isset($this->part->ifparameters)) ? $this->part->ifparameters : false; - if (\is_array($this->part->dparameters)) { + if (isset($this->part->dparameters) && \is_array($this->part->dparameters)) { foreach ($this->part->dparameters as $obj) { if (\in_array(mb_strtolower($obj->attribute), ['filename', 'name'], true)) { $this->attachment[mb_strtolower($obj->attribute)] = pathinfo($obj->value, PATHINFO_FILENAME); @@ -235,7 +235,7 @@ class Attachment } } - if (\is_array($this->part->parameters)) { + if (isset($this->part->parameters) && \is_array($this->part->parameters)) { foreach ($this->part->parameters as $obj) { if (\in_array(mb_strtolower($obj->attribute), ['filename', 'name'], true)) { $this->attachment[mb_strtolower($obj->attribute)] = pathinfo($obj->value, PATHINFO_FILENAME);