From 4f3321cc9f76a53aabaa044feb021fccd5687f0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roland=20H=C3=A4der?= Date: Fri, 17 Jun 2022 11:04:47 +0200 Subject: [PATCH] Nore fixes --- src/Model/APContact.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Model/APContact.php b/src/Model/APContact.php index 9442db00c..fba0c24f4 100644 --- a/src/Model/APContact.php +++ b/src/Model/APContact.php @@ -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']);