Check for post-type key existence in Model\Item::addVisualAttachments

- Address https://github.com/friendica/friendica/issues/10169#issuecomment-844324800
This commit is contained in:
Hypolite Petovan 2021-05-31 01:39:04 -04:00
parent 303c9d4a54
commit 52cf924558
1 changed files with 1 additions and 1 deletions

View File

@ -2864,7 +2864,7 @@ class Item
'mime' => $attachment['mimetype'],
],
]);
if ($item['post-type'] == Item::PT_VIDEO) {
if (($item['post-type'] ?? null) == Item::PT_VIDEO) {
$leading .= $media;
} else {
$trailing .= $media;