|
From: Juergen N. <jue...@fu...> - 2015-01-19 11:51:37
|
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...
[Mon Jan 19 12:47:40 2015] [error] [client 130.133.10.14] PHP Warning:
preg_match(): Unknown modifier '=' in
/home/webmail/src/squirrelmail/plugins/add_address/functions.php on line
723, referer:
https://webmail.zedat.fu-berlin.de:8445/src/read_body.php?mailbox=INBOX&passed_id=102723&startMessage=1
... and the addresses I want to "Add to address book" are marked as
"maybe invalid", because the regular expression itself contains slashes.
So the addcslashes() is definitely needed.
Best regards, Jürgen.
--
<Jue...@fu...> Tel +49.30.838-50740 Fax -450740
Zentraleinrichtung fuer Datenverarbeitung, Central Systems (Unix)
Freie Universitaet Berlin, Fabeckstrasse 32, 14195 Berlin, DE
|