mirror of
https://github.com/friendica/friendica
synced 2025-04-24 09:50:11 +00:00
Changes:
- fixed a null value handled over to Friendica\Model\APContact::getByURL() - added missing type-hints
This commit is contained in:
parent
e96a548286
commit
4fb03cf163
2 changed files with 9 additions and 10 deletions
|
@ -80,13 +80,12 @@ class Receiver
|
|||
/**
|
||||
* Checks incoming message from the inbox
|
||||
*
|
||||
* @param $body
|
||||
* @param $header
|
||||
* @param string $body Body string
|
||||
* @param array $header Header lines
|
||||
* @param integer $uid User ID
|
||||
* @throws \Exception
|
||||
* @todo Find type for $body/$header
|
||||
*/
|
||||
public static function processInbox($body, $header, int $uid)
|
||||
public static function processInbox(string $body, array $header, int $uid)
|
||||
{
|
||||
$activity = json_decode($body, true);
|
||||
if (empty($activity)) {
|
||||
|
@ -98,7 +97,7 @@ class Receiver
|
|||
|
||||
$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