From e0cd609abeaeb1be5ed0ef7ac88bb6de86627881 Mon Sep 17 00:00:00 2001 From: admin Date: Fri, 20 Oct 2006 01:00:31 +0000 Subject: --- system/application/config/config.php | 2 +- system/libraries/Exceptions.php | 12 ++++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) (limited to 'system') 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 = '

'.implode('

', ( ! is_array($message)) ? array($message) : $message).'

'; - + + 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(); -- cgit v1.2.3-24-g4f1b