mirror of
https://github.com/friendica/friendica
synced 2025-04-23 14:30:11 +00:00
Changes:
- as @MrPetovan pointed out, $actor can be NULL earlier and used later as NULL - added some missing type-hints - added missing documentation - the added @TODO points out to avoid true|false|null for a boolean
This commit is contained in:
parent
0c12e947dd
commit
752953e472
3 changed files with 24 additions and 9 deletions
|
@ -95,9 +95,9 @@ class Receiver
|
|||
|
||||
$ldactivity = JsonLD::compact($activity);
|
||||
|
||||
$actor = JsonLD::fetchElement($ldactivity, 'as:actor', '@id');
|
||||
$actor = JsonLD::fetchElement($ldactivity, 'as:actor', '@id') ?? '';
|
||||
$apcontact = APContact::getByURL($actor);
|
||||
|
||||
$apcontact = APContact::getByURL($actor ?? '');
|
||||
if (empty($apcontact)) {
|
||||
Logger::notice('Unable to retrieve AP contact for actor - message is discarded', ['actor' => $actor]);
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue