From bd6774bd9bd917476a3a55e61e14af8c224281fe Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Mon, 18 Nov 2019 07:39:56 +0100 Subject: [PATCH] Fix fatal errors, caused by an empty "verb" --- include/conversation.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/conversation.php b/include/conversation.php index b7f8d91fc4..c1f89ea9b0 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -402,7 +402,7 @@ function visible_activity($item) { /** @var Activity $activity */ $activity = BaseObject::getClass(Activity::class); - if ($activity->isHidden($item['verb'])) { + if (empty($item['verb']) || $activity->isHidden($item['verb'])) { return false; } @@ -1034,7 +1034,7 @@ function builtin_activity_puller($item, &$conv_responses) { /** @var Activity $activity */ $activity = BaseObject::getClass(Activity::class); - if ($activity->match($item['verb'], $verb) && ($item['id'] != $item['parent'])) { + if (!empty($item['verb']) && $activity->match($item['verb'], $verb) && ($item['id'] != $item['parent'])) { $author = ['uid' => 0, 'id' => $item['author-id'], 'network' => $item['author-network'], 'url' => $item['author-link']]; $url = Contact::magicLinkByContact($author); -- 2.39.5