From: Paul L. <pa...@sq...> - 2015-01-18 02:12:02
|
> PHP Deprecated: Function eregi() is deprecated in > /home/webmail/src/squirrelmail/plugins/add_address/functions.php on line > 718, referer: [...] > > --- a/plugins/add_address/functions.php > +++ b/plugins/add_address/functions.php > @@ -715,7 +715,7 @@ function aa_validate_email($email, $verify) > > // check formatting > // > - if (!eregi('^' . $Email_RegExp_Match . '$', $email)) > + if (!preg_match('/^' . addcslashes($Email_RegExp_Match, '/') . > '$/i', $email)) > return FALSE; > > > Is this correct? Any caveats regarding this solution? I don't think you need addcslashes. This should do the job: if (!preg_match('/^' . $Email_RegExp_Match . '$/i', $email)) -- Paul Lesniewski SquirrelMail Team Please support Open Source Software by donating to SquirrelMail! http://squirrelmail.org/donate_paul_lesniewski.php |