if you don´t set the $error_reporting in your instance of the Smarty Class, the error_reporting level inside of the display() and the fetch() methods is turned off (for default), because its inicial value is null. If you use the tags {php}{/php} (Yes, I know that this is deprecated in Smart!) in your template, for example, the script will be interrupted at the point that you applied this tags. No error message is displayed. After this, any update you make in your template wouldn´t update the cache. Frozen the content with the error inside. To recover the updating, we need delete the cache. So, to mantain the consistency between Codeigniter and Smarty and resolves this problem (in part), I sugest the following inserts in MY_Parser.php, at the line 59, before the smarty->fetch() call:
// Configure the $error_reporting of the Smarty equal as that is defined in the Codeigniter
$this->CI->smarty->error_reporting = error_reporting();
with regards,
Dalmo.
PS.: How the parse_string() is an alias method of the string_parse(), to make easy future updates, I sugest you to modify the script to the following changes:
Hi,
if you don´t set the $error_reporting in your instance of the Smarty Class, the error_reporting level inside of the display() and the fetch() methods is turned off (for default), because its inicial value is null. If you use the tags {php}{/php} (Yes, I know that this is deprecated in Smart!) in your template, for example, the script will be interrupted at the point that you applied this tags. No error message is displayed. After this, any update you make in your template wouldn´t update the cache. Frozen the content with the error inside. To recover the updating, we need delete the cache. So, to mantain the consistency between Codeigniter and Smarty and resolves this problem (in part), I sugest the following inserts in MY_Parser.php, at the line 59, before the smarty->fetch() call:
with regards, Dalmo.
PS.: How the parse_string() is an alias method of the string_parse(), to make easy future updates, I sugest you to modify the script to the following changes: