From bca7419987bb3f3c5782b9f8f80d5fa3b614c963 Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 9 Apr 2019 08:35:29 +0000 Subject: [PATCH] Avoid overwriting existing contacts with bad data --- src/Model/Contact.php | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/Model/Contact.php b/src/Model/Contact.php index 1b38fde2ed..51264d4697 100644 --- a/src/Model/Contact.php +++ b/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); -- 2.39.5