]> git.mxchange.org Git - friendica.git/commitdiff
Ensure $owner is set in ActivityPub\Transmitter::sendContactReject
authorHypolite Petovan <hypolite@mrpetovan.com>
Wed, 23 Nov 2022 16:05:36 +0000 (11:05 -0500)
committerHypolite Petovan <hypolite@mrpetovan.com>
Wed, 23 Nov 2022 16:05:36 +0000 (11:05 -0500)
- Address https://github.com/friendica/friendica/issues/11993#issuecomment-1289535020

src/Protocol/ActivityPub/Transmitter.php

index e540cc2a9075efc67c6b770e50258b1697ad79fc..65abb5d5dd38ca8afa1fae7b7617bdff8c8d8aa6 100644 (file)
@@ -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(),