]> git.mxchange.org Git - friendica.git/blobdiff - src/Model/GContact.php
Ensure APContact::getByUrl always returns an array
[friendica.git] / src / Model / GContact.php
index 493d67f024a366f6f858cbdba98fa20ccaf70912..95f1080f8d56570cdd87a2e522121c3024f98c79 100644 (file)
@@ -627,10 +627,11 @@ class GContact
                        $contact['about'] = $contact['about'] ?? '';
                        $contact['generation'] = $contact['generation'] ?? 0;
 
-                       $fields = ['name' => $contact['name'], 'nick' => $contact['nick'], 'addr' => $contact['addr'], 'network' => $contact['network'],
+                       $fields = ['name' => $contact['name'], 'nick' => $contact['nick'] ?? '', 'addr' => $contact['addr'] ?? '', 'network' => $contact['network'],
                                'url' => $contact['url'], 'nurl' => Strings::normaliseLink($contact['url']), 'photo' => $contact['photo'],
                                'created' => DateTimeFormat::utcNow(), 'updated' => DateTimeFormat::utcNow(), 'location' => $contact['location'],
                                'about' => $contact['about'], 'hide' => $contact['hide'], 'generation' => $contact['generation']];
+
                        DBA::insert('gcontact', $fields);
 
                        $condition = ['nurl' => Strings::normaliseLink($contact['url'])];