mirror of
https://github.com/friendica/friendica
synced 2025-04-23 18:30:11 +00:00
Check for the existence of array key before using it in Protocol\ActivityPub\Transmitter
- Address https://github.com/friendica/friendica/issues/9252#issuecomment-739534960
This commit is contained in:
parent
99828c0fea
commit
c7a2988454
2 changed files with 6 additions and 2 deletions
|
@ -103,6 +103,10 @@ class Objects extends BaseModule
|
|||
|
||||
if (empty($parameters['activity']) && ($item['gravity'] != GRAVITY_ACTIVITY)) {
|
||||
$activity = ActivityPub\Transmitter::createActivityFromItem($item['id'], true);
|
||||
if (empty($activity['type'])) {
|
||||
throw new HTTPException\NotFoundException();
|
||||
}
|
||||
|
||||
$activity['type'] = $activity['type'] == 'Update' ? 'Create' : $activity['type'];
|
||||
|
||||
// Only display "Create" activity objects here, no reshares or anything else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue