Error: Smarty_Compiler.class.php on line 268

Hi - I’ve just installed the suitecrm but am faced with one error message that show, intermittently, on all pages > Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/freeman6/public_html/crm2/include/Smarty/Smarty_Compiler.class.php on line 268

Thanks. Gavin.

I’m having similar problem. I enabled display stack tack trace errors and on same pages (trying to chose a related parent category) I see the same exception.

stuck in same error , Kindly please somebody help us out here . ???/////////////////////////////

Dear All,

I have resolved this issue by replacing the code in include/Smarty/Smarty_Compiler.class.php file. I replaced the code on line numbers from 262 to 268 with the below mentioned code. After that delete all the files which are in the cache folder and reload the page. This issue will be resolved.

    /* replace special blocks by "{php}" */ 
        $source_content = preg_replace_callback($search, create_function ('$matches', "return '" 
                                                . $this->_quote_replace($this->left_delimiter) . 'php' 
                                                . "' . str_repeat(\"\n\", substr_count('\$matches[1]', \"\n\")) .'" 
                                                . $this->_quote_replace($this->right_delimiter) 
                                                . "';") 
                                                , $source_content);

Regards,
Sandeep Shivhare

Divine Solitaires