Ensure $owner is set in ActivityPub\Transmitter::sendActivity

- Address https://github.com/friendica/friendica/issues/11993#issuecomment-1322704863
This commit is contained in:
Hypolite Petovan 2022-11-23 10:40:41 -05:00
parent 8e67d28997
commit a8eabae12f

View File

@ -2031,6 +2031,10 @@ class Transmitter
} }
$owner = User::getOwnerDataById($uid); $owner = User::getOwnerDataById($uid);
if (empty($owner)) {
Logger::warning('No user found for actor, aborting', ['uid' => $uid]);
return false;
}
if (empty($id)) { if (empty($id)) {
$id = DI::baseUrl() . '/activity/' . System::createGUID(); $id = DI::baseUrl() . '/activity/' . System::createGUID();