]> 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 bae420c55dc549761fd0a101edb315bfe96c92a6..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'));
                }
@@ -229,9 +230,7 @@ class APContact extends BaseObject
                                }
                        }
                }
-/*
-               $apcontact['inbox'] = JsonLD::fetchElement($compacted, 'ldp:inbox', '@id');
-*/
+
                // To-Do
 
                // Unhandled