From 41376ec2cda617549b717769f942019ebc2ba797 Mon Sep 17 00:00:00 2001 From: Mario Date: Sun, 20 Nov 2022 20:31:59 +0000 Subject: fix issue in tag_deliver() and silence some more warnings --- include/items.php | 5 +++-- include/xchan.php | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/include/items.php b/include/items.php index 4e4869aa8..0f477e761 100644 --- a/include/items.php +++ b/include/items.php @@ -2659,9 +2659,10 @@ function tag_deliver($uid, $item_id) { if ($is_group && intval($x[0]['item_wall'])) { // don't let the forked delivery chain recurse - if ($item['verb'] === 'Announce' && $item['author_xchan'] === $u['channel_hash']) { + if ($item['verb'] === 'Announce' && $item['author_xchan'] === $u[0]['channel_hash']) { return; } + // don't announce moderated content until it has been approved if (intval($item['item_blocked']) === ITEM_MODERATED) { return; @@ -2678,7 +2679,7 @@ function tag_deliver($uid, $item_id) { } elseif (intval($x[0]['item_uplink'])) { - start_delivery_chain($u,$item,$item_id,$x[0]); + start_delivery_chain($u[0], $item, $item_id, $x[0]); } } diff --git a/include/xchan.php b/include/xchan.php index a32064303..4a2d389c0 100644 --- a/include/xchan.php +++ b/include/xchan.php @@ -148,15 +148,15 @@ function xchan_store($arr) { function xchan_fetch($arr) { $key = ''; - if($arr['hash']) { + if(isset($arr['hash']) && $arr['hash']) { $key = 'xchan_hash'; $v = $arr['hash']; } - elseif($arr['guid']) { + elseif(isset($arr['guid']) && $arr['guid']) { $key = 'xchan_guid'; $v = $arr['guid']; } - elseif($arr['address']) { + elseif(isset($arr['address']) && $arr['address']) { $key = 'xchan_addr'; $v = $arr['address']; } -- cgit v1.2.3