summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoruckelman <uckelman@nomic.net>2010-05-09 21:29:31 +0000
committeruckelman <uckelman@nomic.net>2010-05-09 21:29:31 +0000
commitb796ba965add90aa213edcc245867e2f1cc36e0b (patch)
treed307f2c05b62972541fe1280b41edbd57c74143c
parentc10f8aefd2e1d096bb8e5d53050601911c42f1e2 (diff)
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
-rw-r--r--src/EmailMessage.php8
1 files 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;
}
}