]> git.mxchange.org Git - friendica.git/commitdiff
Ensure $owner is set in ActivityPub\Transmitter::sendActivity
authorHypolite Petovan <hypolite@mrpetovan.com>
Wed, 23 Nov 2022 15:40:41 +0000 (10:40 -0500)
committerHypolite Petovan <hypolite@mrpetovan.com>
Wed, 23 Nov 2022 15:40:41 +0000 (10:40 -0500)
- Address https://github.com/friendica/friendica/issues/11993#issuecomment-1322704863

src/Protocol/ActivityPub/Transmitter.php

index 1d71e93337dc3835794d52506d347c31b4a90807..e540cc2a9075efc67c6b770e50258b1697ad79fc 100644 (file)
@@ -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();