WebsiteBaker Support (2.10.x) > General Help & Support

preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead

<< < (2/2)

hgs:
Send a PM to dbs or me, we will then exchange information.

svsanchez:
Hello, I sent the PM to both (hgs + dbs).

svsanchez:
Regarding the original problem:

PHP Deprecated:  preg_replace(): The /e modifier is deprecated, use preg_replace_callba ck instead in /home/deguatec/public_html/modules/show_menu2/include.php on line 216

After checking soem not so big error log files, I noticed that this error stopped at the end of June, so I think it must have been a problem due to the PHP version. I had decided to upgrade my site to 2.12.x and changed the PHP version to 7.1, but since my previous attempts have made the site incredibly slow, I decided to stick with version 2.8.3 until a solution is found for big sites and forgot to change my php version back to 5.6.

So, if you encounter that error, check your php version.

DarkViper:
preg_replace with modifier 'e' only works with deprecated messages from PHP-5.5 and no longer at all from PHP-7.
In order to keep preg_replace 'e' executable under PHP-7, it must be exchanged for preg_replace_callba ck and the code to be executed converted into a callback function.

See: php.net

--- Quote from: php.net pcre modifier 'e' ---e (PREG_REPLACE_EVAL)
    Warning

    This feature was DEPRECATED in PHP 5.5.0, and REMOVED as of PHP 7.0.0.
--- End quote ---

Navigation

[0] Message Index

[*] Previous page

Go to full version