From: Hypolite Petovan Date: Wed, 23 Nov 2022 15:40:41 +0000 (-0500) Subject: Ensure $owner is set in ActivityPub\Transmitter::sendActivity X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=a8eabae12fd8e54c6b16fd6f306640701b8dae23;p=friendica.git Ensure $owner is set in ActivityPub\Transmitter::sendActivity - Address https://github.com/friendica/friendica/issues/11993#issuecomment-1322704863 --- 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();