From 41db39bda0e6c3f70dab457efab0fd4ebbc4d67a Mon Sep 17 00:00:00 2001 From: SJS87 Date: Fri, 13 May 2016 15:42:34 +0100 Subject: [PATCH] E.164 format support - contact_phone_edit.php (#1581) The + prefix is being removed, this should be ignored for the very start of the string, resolution below. Line 69. Replace: $phone_number = preg_replace('{\D}', '', $phone_number); With: $phone_number = preg_replace('{(?!^\+)[\D]}', '', $phone_number); --- app/contacts/contact_phone_edit.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/contacts/contact_phone_edit.php b/app/contacts/contact_phone_edit.php index 8b0bb08c75..8e6c7d12ff 100644 --- a/app/contacts/contact_phone_edit.php +++ b/app/contacts/contact_phone_edit.php @@ -66,7 +66,7 @@ if (strlen($_GET["contact_uuid"]) > 0) { $phone_description = check_str($_POST["phone_description"]); //remove any phone number formatting - $phone_number = preg_replace('{\D}', '', $phone_number); + $phone_number = preg_replace('{(?!^\+)[\D]}', '', $phone_number); //use custom label if set $phone_label = ($phone_label_custom != '') ? $phone_label_custom : $phone_label;