From: Hypolite Petovan Date: Wed, 23 Nov 2022 16:05:36 +0000 (-0500) Subject: Ensure $owner is set in ActivityPub\Transmitter::sendContactReject X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=14ebc4a8210df588eb5509f81b50d083433433e5;p=friendica.git Ensure $owner is set in ActivityPub\Transmitter::sendContactReject - Address https://github.com/friendica/friendica/issues/11993#issuecomment-1289535020 --- diff --git a/src/Protocol/ActivityPub/Transmitter.php b/src/Protocol/ActivityPub/Transmitter.php index e540cc2a90..65abb5d5dd 100644 --- a/src/Protocol/ActivityPub/Transmitter.php +++ b/src/Protocol/ActivityPub/Transmitter.php @@ -2171,6 +2171,11 @@ class Transmitter } $owner = User::getOwnerDataById($uid); + if (empty($owner)) { + Logger::notice('No user found for actor', ['uid' => $uid]); + return false; + } + $data = [ '@context' => ActivityPub::CONTEXT, 'id' => DI::baseUrl() . '/activity/' . System::createGUID(),