diff --git a/classes/context/Context.class.php b/classes/context/Context.class.php index 250df2afc..62b5d6ba2 100644 --- a/classes/context/Context.class.php +++ b/classes/context/Context.class.php @@ -329,10 +329,11 @@ class Context } else { - ob_start(); $this->setCacheControl(-1, true); $_SESSION = array(); } + + ob_start(); register_shutdown_function('Context::close'); // set authentication information in Context and session diff --git a/classes/display/DisplayHandler.class.php b/classes/display/DisplayHandler.class.php index 2f898edf8..f48da0460 100644 --- a/classes/display/DisplayHandler.class.php +++ b/classes/display/DisplayHandler.class.php @@ -106,7 +106,10 @@ class DisplayHandler extends Handler } // disable gzip if output already exists - ob_flush(); + while (ob_get_level()) + { + ob_end_flush(); + } if(headers_sent()) { $this->gz_enabled = FALSE; diff --git a/common/framework/debug.php b/common/framework/debug.php index 0196e9d71..0ed9bfb59 100644 --- a/common/framework/debug.php +++ b/common/framework/debug.php @@ -384,10 +384,7 @@ class Debug */ public static function registerErrorHandlers($error_types) { - if (Config::get('debug.enabled')) - { - set_error_handler('\\Rhymix\\Framework\\Debug::addError', $error_types); - } + set_error_handler('\\Rhymix\\Framework\\Debug::addError', $error_types); set_exception_handler('\\Rhymix\\Framework\\Debug::exceptionHandler'); register_shutdown_function('\\Rhymix\\Framework\\Debug::shutdownHandler'); }