Buy Now
Sign in

preg_replace warning

tomkat , December 07 2015
Hi, I've noticed that when you add to (in my case) tooltip, for the field in designer, sth with "/" -> in my language you can use short code like "w/g", that cose an error
"preg_replace(): Unknown modifier 'g' in /xxx/libraries/cegcore/helpers/data_loader.php on line 178"

removing '/' remove the error

Hi tomkat,

You are right, there is a little bug deep in the code. I can't immediately see a fix, maybe Max can work one out in a future version.

In the meantime you can either set Site Error Reporting to System Default or to None which will hide PHP Warnings like this, or you can replace the / with the HTML entity like this w/g - then there is no warning.

ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much

You are right, I've just posted it only to let know Max about.
However setting error reporting does not solve the problem, cause this error stopped proper rendering of the field. For me that was drop down from database, and when you edited existing record you didn't know what was it exactly. So the only solution is to use another word to avoid "/".