mirror of
https://github.com/ACSPRI/queXS
synced 2024-04-02 12:12:16 +00:00
Removed deprecated ereg_replace
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)";
|
||||
|
||||
Reference in New Issue
Block a user