From: Juergen N. <jue...@fu...> - 2015-01-14 14:28:00
|
As already mentioned on squirrelmail-users, we recently moved our SquirrelMail installation from Debian Squeeze to Wheezy, which implies a move from PHP 5.3 to PHP 5.4. When using the "add_address" plugin (1.0.3, which is the most recent I could find), I see the following message in the error log, which may or may not have been there with previous PHP version as well: """ PHP Deprecated: Function eregi() is deprecated in /home/webmail/src/squirrelmail/plugins/add_address/functions.php on line 718, referer: [...] """ Well, yes, eregi() is deprecated. So I propose the following change, which seems to work for me: --- 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? Mit freundlichem Gruß, Jürgen Nickelsen. -- <Jue...@fu...> Tel +49.30.838-50740 Fax -450740 Zentraleinrichtung fuer Datenverarbeitung, Central Systems (Unix) Freie Universitaet Berlin, Fabeckstrasse 32, 14195 Berlin, DE |