]> git.mxchange.org Git - friendica.git/blobdiff - src/Model/APContact.php
Merge pull request #8007 from MrPetovan/task/7984-add-profile-url-search
[friendica.git] / src / Model / APContact.php
index 346c4ec2f74450757e5863a94a0a8c1fa74dc60c..c535034487c2946a7e61d9be573280af5655f7c0 100644 (file)
@@ -84,7 +84,7 @@ class APContact extends BaseObject
        public static function getByURL($url, $update = null)
        {
                if (empty($url)) {
-                       return false;
+                       return [];
                }
 
                $fetched_contact = false;
@@ -110,7 +110,7 @@ class APContact extends BaseObject
                        }
 
                        if (!is_null($update)) {
-                               return DBA::isResult($apcontact) ? $apcontact : false;
+                               return DBA::isResult($apcontact) ? $apcontact : [];
                        }
 
                        if (DBA::isResult($apcontact)) {
@@ -192,6 +192,7 @@ class APContact extends BaseObject
                        $apcontact['addr'] = '';
                }
 
+               $apcontact['pubkey'] = null;
                if (!empty($compacted['w3id:publicKey'])) {
                        $apcontact['pubkey'] = trim(JsonLD::fetchElement($compacted['w3id:publicKey'], 'w3id:publicKeyPem', '@value'));
                }