From: tokul Date: Sun, 5 Feb 2006 09:13:27 +0000 (+0000) Subject: disable regexp compilation error X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=commitdiff_plain;h=7fc4b14fdb798a7b1c1d003163afa5865cce01f4;hp=766ad164825f9850ccb0ab19afeff42c48395b2d disable regexp compilation error git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@10641 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/functions/abook_local_file.php b/functions/abook_local_file.php index 4e7a6b9e..274e19da 100644 --- a/functions/abook_local_file.php +++ b/functions/abook_local_file.php @@ -276,7 +276,12 @@ class abook_local_file extends addressbook_backend { while ($row = @fgetcsv($this->filehandle, 2048, '|')) { $line = join(' ', $row); - if(eregi($expr, $line)) { + /** + * TODO: regexp search is supported only in local_file backend. + * Do we check format of regexp or ignore errors? + */ + // errors on eregi call are suppressed in order to prevent display of regexp compilation errors + if(@eregi($expr, $line)) { array_push($res, array('nickname' => $row[0], 'name' => $row[1] . ' ' . $row[2], 'firstname' => $row[1],