Avoid overwriting existing contacts with bad data

This commit is contained in:
Michael 2019-04-09 08:35:29 +00:00
parent e268b50890
commit bca7419987

View file

@ -1295,14 +1295,10 @@ class Contact extends BaseObject
return 0; return 0;
} }
if (!empty($default)) { $contact = array_merge(self::getProbeDataFromDatabase($url), $default);
$contact = $default;
} else {
$contact = self::getProbeDataFromDatabase($url);
if (empty($contact)) { if (empty($contact)) {
return 0; return 0;
} }
}
$data = array_merge($data, $contact); $data = array_merge($data, $contact);
} }