From 14ebc4a8210df588eb5509f81b50d083433433e5 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Wed, 23 Nov 2022 11:05:36 -0500 Subject: [PATCH] Ensure $owner is set in ActivityPub\Transmitter::sendContactReject - Address https://github.com/friendica/friendica/issues/11993#issuecomment-1289535020 --- src/Protocol/ActivityPub/Transmitter.php | 5 +++++ 1 file changed, 5 insertions(+) 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(), -- 2.39.5