I am getting this error message appear when trying to support to a payment gateway:
Message: Function eregi_replace() is deprecated
Message: Function eregi_replace() is deprecated
This is the code its relating to in the payment gateway
$response = eregi_replace ( "[[:space:]]+", " ", $response );
$response = eregi_replace ( "[\n\r]", "", $response );
Any help in solving this error would be great!
When a function is deprecated, it means it's not supported anymore and the use of it is discouraged. In fact, all
eregi
functions are deprecated.You should try another function, such as
preg_replace()
. This could mean you have to edit your regular expression.This should work