Ward against empty JsonLD::fetchElement result in ActivityPub\Receiver::processTags
- Address https://github.com/friendica/friendica/issues/12011#issuecomment-1336478368
This commit is contained in:
parent
b1860d4121
commit
607d26e906
1 changed files with 2 additions and 2 deletions
|
@ -209,7 +209,7 @@ class Receiver
|
||||||
Logger::notice('No object data found', ['type' => $type, 'object_type' => $object_type, 'object_id' => $object_id, 'actor' => $actor, 'activity' => $activity]);
|
Logger::notice('No object data found', ['type' => $type, 'object_type' => $object_type, 'object_id' => $object_id, 'actor' => $actor, 'activity' => $activity]);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (self::routeActivities($object_data, $type, true)) {
|
if (self::routeActivities($object_data, $type, true)) {
|
||||||
Logger::debug('Handled activity', ['type' => $type, 'object_type' => $object_type, 'object_id' => $object_id, 'actor' => $actor]);
|
Logger::debug('Handled activity', ['type' => $type, 'object_type' => $object_type, 'object_id' => $object_id, 'actor' => $actor]);
|
||||||
} else {
|
} else {
|
||||||
|
@ -1472,7 +1472,7 @@ class Receiver
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
$element = ['type' => str_replace('as:', '', JsonLD::fetchElement($tag, '@type')),
|
$element = ['type' => str_replace('as:', '', JsonLD::fetchElement($tag, '@type') ?? ''),
|
||||||
'href' => JsonLD::fetchElement($tag, 'as:href', '@id'),
|
'href' => JsonLD::fetchElement($tag, 'as:href', '@id'),
|
||||||
'name' => JsonLD::fetchElement($tag, 'as:name', '@value')];
|
'name' => JsonLD::fetchElement($tag, 'as:name', '@value')];
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue