]> git.mxchange.org Git - friendica.git/commitdiff
Fix a notice in gcontact.php
authorMichael <heluecht@pirati.ca>
Tue, 26 Nov 2019 19:03:21 +0000 (19:03 +0000)
committerMichael <heluecht@pirati.ca>
Tue, 26 Nov 2019 19:03:21 +0000 (19:03 +0000)
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'])];