]> git.mxchange.org Git - friendica.git/commitdiff
Avoid overwriting existing contacts with bad data
authorMichael <heluecht@pirati.ca>
Tue, 9 Apr 2019 08:35:29 +0000 (08:35 +0000)
committerMichael <heluecht@pirati.ca>
Tue, 9 Apr 2019 08:35:29 +0000 (08:35 +0000)
src/Model/Contact.php

index 1b38fde2ed8f0241ce8e6f515a8f7cd6b0e4ec5f..51264d4697e5289dc82c0c8a34be83f12ec89b07 100644 (file)
@@ -1295,13 +1295,9 @@ class Contact extends BaseObject
                                return 0;
                        }
 
-                       if (!empty($default)) {
-                               $contact = $default;
-                       } else {
-                               $contact = self::getProbeDataFromDatabase($url);
-                               if (empty($contact)) {
-                                       return 0;
-                               }
+                       $contact = array_merge(self::getProbeDataFromDatabase($url), $default);
+                       if (empty($contact)) {
+                               return 0;
                        }
 
                        $data = array_merge($data, $contact);