]> git.mxchange.org Git - friendica.git/commitdiff
Fix for "Uncaught Exception TypeError: "Argument 1 passed to
authorRoland Häder <roland@mxchange.org>
Fri, 17 Jun 2022 08:53:45 +0000 (10:53 +0200)
committerRoland Häder <roland@mxchange.org>
Fri, 17 Jun 2022 15:18:31 +0000 (17:18 +0200)
Friendica\Model\APContact::unarchiveInbox() must be of the type string, null
given" error message

src/Model/APContact.php

index d6f4877407935c8cbb4d713a9ceadff6ab3139d4..48e48ab1d70cb7120244b4f09670d90eea9d8cbb 100644 (file)
@@ -220,14 +220,14 @@ class APContact
                $apcontact['type'] = str_replace('as:', '', JsonLD::fetchElement($compacted, '@type'));
                $apcontact['following'] = JsonLD::fetchElement($compacted, 'as:following', '@id');
                $apcontact['followers'] = JsonLD::fetchElement($compacted, 'as:followers', '@id');
-               $apcontact['inbox'] = JsonLD::fetchElement($compacted, 'ldp:inbox', '@id');
+               $apcontact['inbox'] = (JsonLD::fetchElement($compacted, 'ldp:inbox', '@id') ?? '');
                self::unarchiveInbox($apcontact['inbox'], false);
 
                $apcontact['outbox'] = JsonLD::fetchElement($compacted, 'as:outbox', '@id');
 
                $apcontact['sharedinbox'] = '';
                if (!empty($compacted['as:endpoints'])) {
-                       $apcontact['sharedinbox'] = JsonLD::fetchElement($compacted['as:endpoints'], 'as:sharedInbox', '@id');
+                       $apcontact['sharedinbox'] = (JsonLD::fetchElement($compacted['as:endpoints'], 'as:sharedInbox', '@id') ?? '');
                        self::unarchiveInbox($apcontact['sharedinbox'], true);
                }