Smarty PHP7 対応。 Function create_function() is deprecated 対応。

Smarty_Compiler.class.php の $source_content = preg_replace ・・・の部分でエラーになるので、preg_replace_callback()使う方法に修正する情報はありますが、PHP7で  Function create_function() is deprecated  になるので、無名関数を利用するようにして、下記でOKのはず。

$source_content = preg_replace_callback($search, function($matches){

return $this->_quote_replace($this->left_delimiter)
.’php
. str_repeat(” “, substr_count(‘$matches[1]’, ” “))
.$this->_quote_replace($this->right_delimiter);
}, $source_content);

カテゴリー: php