From b796ba965add90aa213edcc245867e2f1cc36e0b Mon Sep 17 00:00:00 2001 From: uckelman Date: Sun, 9 May 2010 21:29:31 +0000 Subject: Always include comment, even if empty. git-svn-id: https://vassalengine.svn.sourceforge.net/svnroot/vassalengine/site-src/trunk@6835 67b53d14-2c14-4ace-a08f-0dab2b34000c --- src/EmailMessage.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/EmailMessage.php b/src/EmailMessage.php index 1c853d7..2caccca 100644 --- a/src/EmailMessage.php +++ b/src/EmailMessage.php @@ -120,16 +120,16 @@ abstract class EmailMessage implements Message { $mimetype = $part->ctype_primary . '/' . $part->ctype_secondary; + $comment = array_key_exists('content-description', $part->headers) ? + $part->headers['content-description'] : ''; + $params = array( 'filename' => $filename, 'mimetype' => $mimetype, + 'comment' => $comment, 'data' => $part->body ); - if (array_key_exists('content-description', $part->headers)) { - $params['comment'] = $part->headers['content-description']; - } - $attachments[] = $params; } } -- cgit v1.2.3