Update functions.php

This commit is contained in:
FusionPBX 2020-01-23 19:33:35 -07:00 committed by GitHub
parent 7f5b35459d
commit 01b081fa7f
1 changed files with 3 additions and 2 deletions

View File

@ -1702,8 +1702,9 @@ function number_pad($number,$n) {
} }
//add prefix //add prefix
if (strlen($prefix) > 0) { if (strlen($prefix) > 0) {
if (strlen($prefix) == 1) { if (strlen($prefix) > 0 && strlen($prefix) < 4) {
$prefix = $prefix.'?'; $plus = (substr($string, 0, 1) == "+") ? '' : '\+?';
$prefix = $plus.$prefix.'?';
} }
else { else {
$prefix = '(?:'.$prefix.')?'; $prefix = '(?:'.$prefix.')?';