diff --git a/functions/functions.import.php b/functions/functions.import.php index e32475b1..1bf9fccf 100644 --- a/functions/functions.import.php +++ b/functions/functions.import.php @@ -50,7 +50,7 @@ include_once(dirname(__FILE__).'/../db.inc.php'); */ function only_numbers($str) { - return ereg_replace('[^0-9]*','',$str); + return preg_replace("/[^0-9]/", "",$str); } diff --git a/functions/functions.input.php b/functions/functions.input.php index 57fcf1d0..ab7977f6 100644 --- a/functions/functions.input.php +++ b/functions/functions.input.php @@ -44,7 +44,7 @@ include_once(dirname(__FILE__).'/../config.inc.php'); */ function bigintval($val) { - $r = ereg_replace('[^0-9]*','',$val); + $r = preg_replace("/[^0-9]/", "",$val); if (empty($r)) return 0; else diff --git a/functions/functions.operator.php b/functions/functions.operator.php index 764bc114..60787269 100644 --- a/functions/functions.operator.php +++ b/functions/functions.operator.php @@ -562,7 +562,7 @@ function get_case_id($operator_id, $create = false) $i = 1; foreach ($r5 as $r5v) { - $tnum = ereg_replace('[^0-9]*','',$r5v['phone']); + $tnum = preg_replace("/[^0-9]/", "",$r5v['phone']); if (empty($tnum)) $tnum = "312345678"; //handle error condition $sql = "INSERT INTO contact_phone (case_id,priority,phone) VALUES ($case_id,$i,$tnum)";