]> git.mxchange.org Git - friendica.git/commitdiff
Issue 8371 again: Fallback for item permissions
authorMichael <heluecht@pirati.ca>
Fri, 20 Mar 2020 04:52:04 +0000 (04:52 +0000)
committerMichael <heluecht@pirati.ca>
Fri, 20 Mar 2020 04:52:04 +0000 (04:52 +0000)
mod/item.php

index 3566e2150ceb66416585ba7935f8ade2163cada4..c18941471096561c901791da954bcb133c896de2 100644 (file)
@@ -128,7 +128,7 @@ function item_post(App $a) {
                        $thread_parent_contact = Contact::getDetailsByURL($toplevel_item["author-link"]);
 
                        if ($toplevel_item['id'] != $toplevel_item['parent']) {
-                               $toplevel_item = Item::selectFirst(Item::ITEM_FIELDLIST, ['id' => $toplevel_item['parent']]);
+                               $toplevel_item = Item::selectFirst([], ['id' => $toplevel_item['parent']]);
                        }
                }
 
@@ -298,10 +298,10 @@ function item_post(App $a) {
                                $network = $toplevel_item['network'];
                        }
 
-                       $str_contact_allow = $toplevel_item['allow_cid'];
-                       $str_group_allow   = $toplevel_item['allow_gid'];
-                       $str_contact_deny  = $toplevel_item['deny_cid'];
-                       $str_group_deny    = $toplevel_item['deny_gid'];
+                       $str_contact_allow = $toplevel_item['allow_cid'] ?? '';
+                       $str_group_allow   = $toplevel_item['allow_gid'] ?? '';
+                       $str_contact_deny  = $toplevel_item['deny_cid'] ?? '';
+                       $str_group_deny    = $toplevel_item['deny_gid'] ?? '';
                        $private           = $toplevel_item['private'];
 
                        $wall              = $toplevel_item['wall'];