Browse Source

Avoid overwriting existing contacts with bad data

pull/6988/head
Michael 3 years ago
parent
commit
bca7419987
  1. 10
      src/Model/Contact.php

10
src/Model/Contact.php

@ -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);

Loading…
Cancel
Save