]> git.mxchange.org Git - friendica.git/commitdiff
Fix "Undefined index: post-type in .../src/Model/Item.php on line 2888"
authorMichael <heluecht@pirati.ca>
Wed, 2 Jun 2021 17:43:30 +0000 (17:43 +0000)
committerMichael <heluecht@pirati.ca>
Wed, 2 Jun 2021 17:43:30 +0000 (17:43 +0000)
src/Model/Item.php

index 7bc8270a174b6c01a29d529ff4ceedc346682e34..2b57557ca855bd9c92a96a9dc6339cf11afa1fc4 100644 (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;