You are here:  » PHP Warning

Active Forum Topics


PHP Warning

Submitted by thelegacy on Sun, 2018-05-06 13:32 in

Hi David, hope all is well with you. So, here I've found myself with what I'm sure is something simple, yet I've not located where my error comes from exactly when I d an import:

PHP Warning: preg_match(): Empty regular expression in filter.php on line 188

I am running the latest version of PT on this installation. Would you mind pointing me in the right direction please.
Thanks in advance.

Submitted by support on Tue, 2018-05-08 07:41

Hi,

That would imply that you have a Drop Record RegExp filter in place with nothing in the "Drop record if field matches regular expression" box on the configuration page. If you were intending to use the filter to drop records where a particular, non-mandatory field is empty you could use:

/^$/

...which would match an empty string (^ is the beginning of line anchor and $ the end of line anchor, with / as delimiters in this case). If you need to supress the warning, you can prefix the preg_match function with @ by changing line 188 of filter.php as follows;

      $filter_dropRecordFlag = @preg_match($filter_data["text"],$text);

Cheers,
David.
--
PriceTapestry.com