From 10954d66ddabb7e009d6ae0b7d6f5b6a571fc83f Mon Sep 17 00:00:00 2001 From: Sergey Linnik Date: Wed, 16 Sep 2015 17:31:43 +0300 Subject: [PATCH] Fix empty attachment name in some cases --- 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 @@ class Attachment $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']); }