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

- Address https://github.com/friendica/friendica/issues/10169#issuecomment-844324800
2022.09-rc
Hypolite Petovan 2021-05-31 01:39:04 -04:00
rodzic 303c9d4a54
commit 52cf924558
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

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