[ActivityPub] Fix undefined tag index 'type' in Activitypub_notice

This commit is contained in:
Diogo Cordeiro 2020-02-14 17:25:26 +00:00 committed by Diogo Peralta Cordeiro
parent 0204ffb1fa
commit 4a90f281ed
1 changed files with 1 additions and 1 deletions

View File

@ -187,7 +187,7 @@ class Activitypub_notice
$mentions = [];
if (isset($object['tag']) && is_array($object['tag'])) {
foreach ($object['tag'] as $tag) {
if ($tag['type'] == 'Mention') {
if (array_key_exists('type', $tag) && $tag['type'] == 'Mention') {
$mentions[] = $tag['href'];
}
}