Deprecated: preg_replace(): The /e modifier is deprecated ..

This is the place to discuss bugs that have been found in the most recent version of PivotX. Posting bugs will ensure that the Development Team is aware of them and that they will be addressed when resources are available.

Deprecated: preg_replace(): The /e modifier is deprecated ..

Postby knut » Sun Nov 10, 2013 9:15 am


my provider upgraded PHP and now my website is covert with warnings:
Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in pivotx/modules/smarty/Smarty_Compiler.class.php on line 270

I use the latest pivotx release 2.3.7

To quickly switch of the warning I put:
error_reporting(error_reporting() & ~E_DEPRECATED);
into my index.php, but this didn't help consequently. I tested with different browsers and computers and still see the warning, at least once, most times after clearing the browser cache.

The warning also appears for other files like lib.php line 4742...

Any ideas why I could not switch of the warning?

Posts: 7
Joined: Thu Mar 07, 2013 2:38 pm

Re: Deprecated: preg_replace(): The /e modifier is deprecate

Postby Harm10 » Fri Nov 15, 2013 5:07 pm

I've alerted one of the experts about this. In the meantime you could experiment with replacing the indicated preg_replace code by preg_replace_callback.
Some explanation can be found on
Quality is in the detail of things............

Want to change or update your PivotX site? Mail or PM me!
I can also convert your site to a Wordpress site!
Posts: 2011
Joined: Wed Jun 17, 2009 9:37 am
Location: Somewhere in The Netherlands (aka Holland)

Re: Deprecated: preg_replace(): The /e modifier is deprecate

Postby hansfn » Wed Dec 11, 2013 12:03 pm

This was fixed in revision 4313. I recommend replacing your current Smarty_Compiler.class.php with the HEAD version. (This fix will be part of PivotX 2.3.8.)
Posts: 3282
Joined: Sun Nov 25, 2007 7:48 pm
Location: Molde, Norway

Return to 2.x Bugs

Who is online

Users browsing this forum: No registered users and 6 guests