aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIvan Enderlin <ivan.enderlin@hoa-project.net>2015-05-27 11:14:05 +0200
committerIvan Enderlin <ivan.enderlin@hoa-project.net>2015-05-27 11:14:05 +0200
commit4ae44c4d0f09fe9d1aee471764eb7743356f4b3e (patch)
tree5b084bd5df7840ac1e1d50a81584a8b7079f788f
parentf09bc78018b5c20383e110143b98457e713a47b1 (diff)
downloadMail-4ae44c4d0f09fe9d1aee471764eb7743356f4b3e.zip
Mail-4ae44c4d0f09fe9d1aee471764eb7743356f4b3e.tar.gz
Mail-4ae44c4d0f09fe9d1aee471764eb7743356f4b3e.tar.bz2
If attachment' size is unknown, remove it.
-rw-r--r--Content/Attachment.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/Content/Attachment.php b/Content/Attachment.php
index da0783f..c1e2f7d 100644
--- a/Content/Attachment.php
+++ b/Content/Attachment.php
@@ -95,8 +95,9 @@ class Attachment extends Content
$size = null;
- if ($stream instanceof Stream\IStream\Statable) {
- $size = '; size=' . $stream->getSize();
+ if ($stream instanceof Stream\IStream\Statable &&
+ false !== $_size = $stream->getSize()) {
+ $size = '; size=' . $_size;
}
$this['content-type'] = $mimeType;