Skip to content

Commit cf53570

Browse files
committed
Disposition problem fixed
1 parent 62a15f9 commit cf53570

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/IMAP/Message.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ protected function fetchAttachment($structure, $partNumber){
416416
foreach ($structure->dparameters as $parameter) {
417417
if (strtolower($parameter->attribute) == "filename") {
418418
$attachment->name = $parameter->value;
419-
$attachment->disposition = $structure->disposition;
419+
$attachment->disposition = property_exists($structure, 'disposition') ? $structure->disposition : null;
420420
break;
421421
}
422422
}
@@ -426,7 +426,7 @@ protected function fetchAttachment($structure, $partNumber){
426426
foreach ($structure->parameters as $parameter) {
427427
if (strtolower($parameter->attribute) == "name") {
428428
$attachment->name = $parameter->value;
429-
$attachment->disposition = $structure->disposition;
429+
$attachment->disposition = property_exists($structure, 'disposition') ? $structure->disposition : null;
430430
break;
431431
}
432432
}

0 commit comments

Comments
 (0)