Issue Bug Closed

#18643TypoScript Constant Editor produces PHP Warning: ereg() Invalid preceding regular expression in class.t3lib_tsparser_ext.php

LUBRANO J.F. 04/19/08, 16:16 updated 10/02/18, 12:30

Description

I am training with “typo 3 pour les nuls” and when I try to build a custom template (see page 20) access to template/constant editor fire the following message :
Warning: ereg() [function.ereg]: Invalid preceding regular expression in /home.10/swisscot/www/cms/t3lib/class.t3lib_tsparser_ext.php on line 1099

looking to line 1099 in class.t3lib_tsparser_ext.php I see :

if (ereg(‘^{[\$][a-zA-Z0-9\.]*}$’,trim($fV),$reg))

The regular expression seems to be strange. Trying to replace “{” with “(“
and “}” with “)” suppress the message

Is it a good solution ?

P.S. I am not specialist with PHP and regular expressions
(issue imported from #M8161)

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.