Skip to content

Commit

Permalink
Fix #10975: eregi_replace() is deprecated
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
davidhicks committed Oct 5, 2009
1 parent 2fe9342 commit b4b10a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/print_api.php
Expand Up @@ -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 '<input type="text" name="' . $p_field_name . '" size="20" maxlength="64" value="' . $p_email . '" />@' . $t_limit_email_domain;
} else {
echo '<input type="text" name="' . $p_field_name . '" size="32" maxlength="64" value="' . $p_email . '" />';
Expand Down

0 comments on commit b4b10a4

Please sign in to comment.