Merge pull request #10363 from annando/notice

Fix "Undefined index: post-type in .../src/Model/Item.php on line 2888"
This commit is contained in:
Tobias Diekershoff 2021-06-02 20:45:21 +02:00 committed by GitHub
commit ab7f26aca0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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;