]> git.mxchange.org Git - friendica.git/blobdiff - src/Model/APContact.php
Merge pull request #9 from nupplaphil/dependabot/composer/guzzlehttp/guzzle-6.5.8
[friendica.git] / src / Model / APContact.php
index 9442db00cdfc79138d101f0bf53cdb1121c240f1..9269ee7903875f386e07a26645aebfe14441cf72 100644 (file)
@@ -116,6 +116,7 @@ class APContact
         * @return array profile array
         * @throws \Friendica\Network\HTTPException\InternalServerErrorException
         * @throws \ImagickException
+        * @todo Rewrite parameter $update to avoid true|false|null (boolean is binary, null adds a third case)
         */
        public static function getByURL(string $url, $update = null): array
        {
@@ -124,7 +125,7 @@ class APContact
                        return [];
                }
 
-               $fetched_contact = false;
+               $fetched_contact = [];
 
                if (empty($update)) {
                        if (is_null($update)) {
@@ -206,7 +207,7 @@ class APContact
 
                        if ($failed) {
                                self::markForArchival($fetched_contact ?: []);
-                               return $fetched_contact ?? [];
+                               return $fetched_contact;
                        }
                }
 
@@ -526,6 +527,7 @@ class APContact
         *
         * @param string  $url    inbox url
         * @param boolean $shared Shared Inbox
+        * @return void
         */
        private static function unarchiveInbox(string $url, bool $shared)
        {