]> git.mxchange.org Git - friendica.git/blobdiff - src/Model/APContact.php
Preparations for a relocation message / fix for notice
[friendica.git] / src / Model / APContact.php
index e5dd27e0e36f55dcae1a5bfd4bdbabea753742ee..917e0895dcb1ff8020c069fd970d0057a136a49c 100644 (file)
@@ -106,6 +106,10 @@ class APContact extends BaseObject
 
                $compacted = JsonLD::compact($data);
 
+               if (empty($compacted['@id'])) {
+                       return false;
+               }
+
                $apcontact = [];
                $apcontact['url'] = $compacted['@id'];
                $apcontact['uuid'] = JsonLD::fetchElement($compacted, 'diaspora:guid');
@@ -193,7 +197,7 @@ class APContact extends BaseObject
                // Update the gcontact table
                DBA::update('gcontact', $contact_fields, ['nurl' => normalise_link($url)]);
 
-               Logger::log('Updated profile for ' . $url, LOGGER_DEBUG);
+               Logger::log('Updated profile for ' . $url, Logger::DEBUG);
 
                return $apcontact;
        }