From: Hypolite Petovan Date: Mon, 31 May 2021 05:39:04 +0000 (-0400) Subject: Check for post-type key existence in Model\Item::addVisualAttachments X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=52cf9245580378c75fe17eca3bca336d8caa9758;p=friendica.git Check for post-type key existence in Model\Item::addVisualAttachments - Address https://github.com/friendica/friendica/issues/10169#issuecomment-844324800 --- diff --git a/src/Model/Item.php b/src/Model/Item.php index 0ca1138f9e..b7267428ab 100644 --- a/src/Model/Item.php +++ b/src/Model/Item.php @@ -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;