From 01b081fa7fa06587c4527fb6a833e425eefeca4b Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Thu, 23 Jan 2020 19:33:35 -0700 Subject: [PATCH] Update functions.php --- resources/functions.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/resources/functions.php b/resources/functions.php index 93b35e82dc..cd47c4c8d8 100644 --- a/resources/functions.php +++ b/resources/functions.php @@ -1702,8 +1702,9 @@ function number_pad($number,$n) { } //add prefix if (strlen($prefix) > 0) { - if (strlen($prefix) == 1) { - $prefix = $prefix.'?'; + if (strlen($prefix) > 0 && strlen($prefix) < 4) { + $plus = (substr($string, 0, 1) == "+") ? '' : '\+?'; + $prefix = $plus.$prefix.'?'; } else { $prefix = '(?:'.$prefix.')?';