diff --git a/src/Model/Item.php b/src/Model/Item.php index 7bc8270a17..2b57557ca8 100644 --- a/src/Model/Item.php +++ b/src/Model/Item.php @@ -2885,7 +2885,7 @@ class Item 'mime' => $attachment['mimetype'], ], ]); - if ($item['post-type'] == Item::PT_AUDIO) { + if (($item['post-type'] ?? null) == Item::PT_AUDIO) { $leading .= $media; } else { $trailing .= $media;