Skip to content

Commit

Permalink
You can now set Smarty error reporting via the Smarty config file.
Browse files Browse the repository at this point in the history
  • Loading branch information
Vheissu committed Apr 28, 2011
1 parent 6ec100e commit d181d6d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion config/smarty.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,7 @@
$config['config_directory'] = APPPATH."third_party/Smarty/configs";

// Default extension of templates if one isn't supplied
$config['template_ext'] = 'php';
$config['template_ext'] = 'php';

// PHP error reporting level (can be any valid error reporting level)
$config['error_reporting'] = "E_ERROR";
2 changes: 1 addition & 1 deletion libraries/Smarty.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public function __construct()

// Only show serious errors. Without this if you try and use variables that
// do not exist, Smarty will throw variable does not exist errors
$this->error_reporting = "E_ERROR";
$this->error_reporting = $this->CI->config->item('error_reporting');

// Add all helpers to plugins_dir
$helpers = glob(APPPATH . 'helpers/', GLOB_ONLYDIR | GLOB_MARK);
Expand Down

0 comments on commit d181d6d

Please sign in to comment.