diff --git a/src/Fetch/Attachment.php b/src/Fetch/Attachment.php index e77984a..25042e2 100644 --- a/src/Fetch/Attachment.php +++ b/src/Fetch/Attachment.php @@ -92,9 +92,9 @@ public function __construct(Message $message, $structure, $partIdentifier = null $parameters = Message::getParametersFromStructure($structure); - if (isset($parameters['filename'])) { + if (!empty($parameters['filename'])) { $this->setFileName($parameters['filename']); - } elseif (isset($parameters['name'])) { + } elseif (!empty($parameters['name'])) { $this->setFileName($parameters['name']); }