]> git.mxchange.org Git - friendica.git/commitdiff
Fix fatal errors, caused by an empty "verb"
authorMichael Vogel <icarus@dabo.de>
Mon, 18 Nov 2019 06:39:56 +0000 (07:39 +0100)
committerMichael Vogel <icarus@dabo.de>
Mon, 18 Nov 2019 06:39:56 +0000 (07:39 +0100)
include/conversation.php

index b7f8d91fc40cd37193851788f0cb0383e7949eaf..c1f89ea9b0960fff69ef236632063a413fa723c2 100644 (file)
@@ -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);