From da7d5c86ccd2e35e6e75d719788548761dad8a4a Mon Sep 17 00:00:00 2001 From: David Hicks Date: Mon, 5 Oct 2009 18:41:28 +1100 Subject: [PATCH] Fix #10975: eregi_replace() is deprecated eregi_replace() is deprecated in PHP 5.3.0 and should be replaced with preg_replace instead (with the 'i' modifier for case insentive matching). --- core/print_api.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/print_api.php b/core/print_api.php index 149e466e63..4718ff05fc 100644 --- a/core/print_api.php +++ b/core/print_api.php @@ -188,7 +188,7 @@ function print_email_input( $p_field_name, $p_email ) { if( $t_limit_email_domain ) { # remove the domain part - $p_email = eregi_replace( "@$t_limit_email_domain$", '', $p_email ); + $p_email = preg_replace( '/@' . preg_quote( $t_limit_email_domain, '/' ) . '$/i', '', $p_email ); echo '@' . $t_limit_email_domain; } else { echo '';