From 6cb6658526d65fa737888c392daf5077c8048f54 Mon Sep 17 00:00:00 2001 From: Sergey Linnik Date: Tue, 25 Aug 2015 23:38:12 +0300 Subject: [PATCH] Check name and filename is empty --- src/Fetch/Message.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Fetch/Message.php b/src/Fetch/Message.php index e382678..fb0da40 100755 --- a/src/Fetch/Message.php +++ b/src/Fetch/Message.php @@ -508,7 +508,7 @@ class Message { $parameters = self::getParametersFromStructure($structure); - if ((isset($parameters['name']) || isset($parameters['filename'])) + if ((!empty($parameters['name']) || !empty($parameters['filename'])) || (isset($structure->subtype) && strtolower($structure->subtype) == 'rfc822') ) { $attachment = new Attachment($this, $structure, $partIdentifier);