The PHP Template Engine: Smarty 2.6.0 (/includes/Smarty) is using a deprecated modifier βeβ for preg_replace function call:
Block causing error: /include/Smarty/Smarty_Compiler.class.php @ line 262
/* replace special blocks by "{php}" */
$source_content = preg_replace($search.'e', "'"
. $this->_quote_replace($this->left_delimiter) . 'php'
. "' . str_repeat(\"\n\", substr_count('\\0', \"\n\")) .'"
. $this->_quote_replace($this->right_delimiter)
. "'"
, $source_content);
if you try simply to upgrade Smarty to the current version 3.1.16, or the closest available version 2.6.28. it will not work.
So I applied substitute call recommanded by PHP reference.
Change: /include/Smarty/Smarty_Compiler.class.php @ line 262
/* replace special blocks by "{php}" */
$source_content = preg_replace_callback($search,
function($m) {
return "{php ".str_repeat("\n", substr_count($m[0], "\n"))."}";
},
$source_content);
I hope this will help someone else and save him few hours.