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:
Re: PHP Deprecated: Function eregi() is deprecated
On 18.01.2015 03:11, Paul Lesniewski wrote:
>> - if (!eregi('^' . $Email_RegExp_Match . '$', $email))
>> + if (!preg_match('/^' . addcslashes($Email_RegExp_Match, '/') .
> I don't think you need addcslashes. This should do the job:
> if (!preg_match('/^' . $Email_RegExp_Match . '$/i', $email))
I do, because the regular expression contains a slash. Omitting
addcslashes() not only gives me a warning message...