From 2f7e1f94a7d9b173b1eb07fe530eec8cff4c8cd5 Mon Sep 17 00:00:00 2001 From: Alexander Ustimenko Date: Wed, 27 Dec 2017 17:08:16 +0700 Subject: [PATCH] Switch to !empty instead of isset in case of corrupted attachment properties --- src/Fetch/Attachment.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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']); }