updated ErrorHandler to check for existing output buffers befor ob_clean
This commit is contained in:
@ -19,9 +19,11 @@ class ErrorHandler
|
||||
|
||||
static public function error_handler($errno, $errstr, $errfile, $errline)
|
||||
{
|
||||
ob_clean();
|
||||
$ob_handlers = ob_get_status();
|
||||
if (!empty($ob_handlers)) {
|
||||
ob_end_clean();
|
||||
}
|
||||
throw new ErrorException($errstr, 0, $errno, $errfile, $errline);
|
||||
return false;
|
||||
}
|
||||
|
||||
static protected function getSource($file, $hiline)
|
||||
@ -71,7 +73,10 @@ class ErrorHandler
|
||||
*/
|
||||
static public function showDebug($exception)
|
||||
{
|
||||
ob_clean();
|
||||
$ob_handlers = ob_get_status();
|
||||
if (!empty($ob_handlers)) {
|
||||
ob_end_clean();
|
||||
}
|
||||
$class = get_class($exception);
|
||||
|
||||
$method = Env::Server('REQUEST_METHOD', '');
|
||||
|
Reference in New Issue
Block a user