From 2efb2f7804f3bf993c22959db0990780122b6c8f Mon Sep 17 00:00:00 2001 From: agree <37550360+greenbea@users.noreply.github.com> Date: Tue, 4 Feb 2020 15:08:05 -0500 Subject: [PATCH] Update contact_import.php (#5143) --- app/contacts/contact_import.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/contacts/contact_import.php b/app/contacts/contact_import.php index 7ae43e30f1..f0f2b4cafb 100644 --- a/app/contacts/contact_import.php +++ b/app/contacts/contact_import.php @@ -291,9 +291,9 @@ $parent = get_parent($schema, $table_name); //remove formatting from the phone number - // if ($field_name == "phone_number") { - // $result[$key] = preg_replace('{\D}', '', $result[$key]); - // } + if ($field_name == "phone_number") { + $result[$key] = preg_replace('{(?!^\+)[\D]}', '', $result[$key]); + } //build the data array if (strlen($table_name) > 0) {