]> git.mxchange.org Git - friendica.git/commitdiff
Check for post-type key existence in Model\Item::addVisualAttachments
authorHypolite Petovan <hypolite@mrpetovan.com>
Mon, 31 May 2021 05:39:04 +0000 (01:39 -0400)
committerHypolite Petovan <hypolite@mrpetovan.com>
Mon, 31 May 2021 12:29:50 +0000 (08:29 -0400)
- Address https://github.com/friendica/friendica/issues/10169#issuecomment-844324800

src/Model/Item.php

index 0ca1138f9ea129c9b10262d21b06c5549924b475..b7267428ab4f563af587d3e8ddb74b469d3ab3f9 100644 (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;