]> git.mxchange.org Git - friendica.git/commitdiff
Nore fixes
authorRoland Häder <roland@mxchange.org>
Fri, 17 Jun 2022 09:04:47 +0000 (11:04 +0200)
committerRoland Häder <roland@mxchange.org>
Fri, 17 Jun 2022 15:18:31 +0000 (17:18 +0200)
src/Model/APContact.php

index 9442db00cdfc79138d101f0bf53cdb1121c240f1..fba0c24f4c22d2613ff15e29e8d78a803d76d7fd 100644 (file)
@@ -275,7 +275,7 @@ class APContact
 
                // Quit if none of the basic values are set
                if (empty($apcontact['url']) || empty($apcontact['type']) || (($apcontact['type'] != 'Tombstone') && empty($apcontact['inbox']))) {
-                       return $fetched_contact;
+                       return $fetched_contact ?? [];
                } elseif ($apcontact['type'] == 'Tombstone') {
                        // The "inbox" field must have a content
                        $apcontact['inbox'] = '';
@@ -283,7 +283,7 @@ class APContact
 
                // Quit if this doesn't seem to be an account at all
                if (!in_array($apcontact['type'], ActivityPub::ACCOUNT_TYPES)) {
-                       return $fetched_contact;
+                       return $fetched_contact ?? [];
                }
 
                $parts = parse_url($apcontact['url']);