Fix fatal errors, caused by an empty "verb"
This commit is contained in:
parent
3ba9aa0e8e
commit
bd6774bd9b
|
@ -402,7 +402,7 @@ function visible_activity($item) {
|
||||||
/** @var Activity $activity */
|
/** @var Activity $activity */
|
||||||
$activity = BaseObject::getClass(Activity::class);
|
$activity = BaseObject::getClass(Activity::class);
|
||||||
|
|
||||||
if ($activity->isHidden($item['verb'])) {
|
if (empty($item['verb']) || $activity->isHidden($item['verb'])) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1034,7 +1034,7 @@ function builtin_activity_puller($item, &$conv_responses) {
|
||||||
/** @var Activity $activity */
|
/** @var Activity $activity */
|
||||||
$activity = BaseObject::getClass(Activity::class);
|
$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'],
|
$author = ['uid' => 0, 'id' => $item['author-id'],
|
||||||
'network' => $item['author-network'], 'url' => $item['author-link']];
|
'network' => $item['author-network'], 'url' => $item['author-link']];
|
||||||
$url = Contact::magicLinkByContact($author);
|
$url = Contact::magicLinkByContact($author);
|
||||||
|
|
Loading…
Reference in a new issue