Skip to content

Commit 141dc10

Browse files
committed
Always parse the attachment description if it is available
1 parent 9d0377e commit 141dc10

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Attachment.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,10 @@ protected function fetch(): void {
236236
$this->filename = $this->decodeName($filename);
237237
}
238238

239+
if (($description = $this->part->description) !== null) {
240+
$this->description = $this->part->getHeader()->decode($description);
241+
}
242+
239243
if (($name = $this->part->name) !== null) {
240244
$this->name = $this->decodeName($name);
241245
}
@@ -248,7 +252,6 @@ protected function fetch(): void {
248252
if (!$this->name) {
249253
$this->name = $this->part->description;
250254
}
251-
$this->description = $this->part->description;
252255
} else if (!$this->name) {
253256
$this->name = $this->part->subtype;
254257
}

0 commit comments

Comments
 (0)