From a8eabae12fd8e54c6b16fd6f306640701b8dae23 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Wed, 23 Nov 2022 10:40:41 -0500 Subject: [PATCH] Ensure $owner is set in ActivityPub\Transmitter::sendActivity - Address https://github.com/friendica/friendica/issues/11993#issuecomment-1322704863 --- src/Protocol/ActivityPub/Transmitter.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Protocol/ActivityPub/Transmitter.php b/src/Protocol/ActivityPub/Transmitter.php index 1d71e93337..e540cc2a90 100644 --- a/src/Protocol/ActivityPub/Transmitter.php +++ b/src/Protocol/ActivityPub/Transmitter.php @@ -2031,6 +2031,10 @@ class Transmitter } $owner = User::getOwnerDataById($uid); + if (empty($owner)) { + Logger::warning('No user found for actor, aborting', ['uid' => $uid]); + return false; + } if (empty($id)) { $id = DI::baseUrl() . '/activity/' . System::createGUID(); -- 2.39.5