Merge pull request #9245 from annando/notice

Fix notice "Undefined index: gravity"
This commit is contained in:
Hypolite Petovan 2020-09-20 11:17:07 -04:00 committed by GitHub
commit 4c3d28488f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 1 deletions

View file

@ -163,7 +163,7 @@ class PageInfo
} }
} }
$text .= ']' . $data['text'] . '[/attachment]'; $text .= ']' . $data['text'] ?? '' . '[/attachment]';
$hashtags = ''; $hashtags = '';
if (!empty($data['keywords'])) { if (!empty($data['keywords'])) {

View file

@ -272,6 +272,7 @@ class Processor
$item = self::processContent($activity, $item); $item = self::processContent($activity, $item);
if (empty($item)) { if (empty($item)) {
Logger::info('Message was not processed');
return []; return [];
} }

View file

@ -487,6 +487,10 @@ class Receiver
$object_data['thread-completion'] = true; $object_data['thread-completion'] = true;
$item = ActivityPub\Processor::createItem($object_data); $item = ActivityPub\Processor::createItem($object_data);
if (empty($item)) {
return;
}
$item['post-type'] = Item::PT_ANNOUNCEMENT; $item['post-type'] = Item::PT_ANNOUNCEMENT;
ActivityPub\Processor::postItem($object_data, $item); ActivityPub\Processor::postItem($object_data, $item);