diff --git a/src/Fetch/Attachment.php b/src/Fetch/Attachment.php index e77984a..4079c5a 100644 --- a/src/Fetch/Attachment.php +++ b/src/Fetch/Attachment.php @@ -97,8 +97,10 @@ public function __construct(Message $message, $structure, $partIdentifier = null } elseif (isset($parameters['name'])) { $this->setFileName($parameters['name']); } - - $this->size = $structure->bytes; + + if (isset($structure->bytes)) { + $this->size = $structure->bytes; + } $this->mimeType = Message::typeIdToString($structure->type);