diff options
Diffstat (limited to 'system')
-rw-r--r-- | system/application/config/config.php | 2 | ||||
-rw-r--r-- | system/libraries/Exceptions.php | 12 |
2 files changed, 11 insertions, 3 deletions
diff --git a/system/application/config/config.php b/system/application/config/config.php index 3f26d48fa..bf15525cb 100644 --- a/system/application/config/config.php +++ b/system/application/config/config.php @@ -78,7 +78,7 @@ $config['language'] = "english"; | setting this variable to TRUE (boolean). See the user guide for details. | */ -$config['enable_hooks'] = FALSE; +$config['enable_hooks'] = TRUE; /* diff --git a/system/libraries/Exceptions.php b/system/libraries/Exceptions.php index c3af801ae..4bdbe4f83 100644 --- a/system/libraries/Exceptions.php +++ b/system/libraries/Exceptions.php @@ -117,7 +117,11 @@ class CI_Exceptions { function show_error($heading, $message, $template = 'error_general') { $message = '<p>'.implode('</p><p>', ( ! is_array($message)) ? array($message) : $message).'</p>'; - + + if (ob_get_level() > 1) + { + ob_end_flush(); + } ob_start(); include_once(APPPATH.'errors/'.$template.EXT); $buffer = ob_get_contents(); @@ -151,7 +155,11 @@ class CI_Exceptions { $x = explode('/', $filepath); $filepath = $x[count($x)-2].'/'.end($x); } - + + if (ob_get_level() > 1) + { + ob_end_flush(); + } ob_start(); include_once(APPPATH.'errors/error_php'.EXT); $buffer = ob_get_contents(); |