From c304a9ab43bf0bda41907db3e6f65293350640a2 Mon Sep 17 00:00:00 2001 From: slawkens Date: Mon, 27 Jan 2025 21:29:43 +0100 Subject: [PATCH] Better exception handler, which clears the whole html output, so the message is better visible --- index.php | 1 + system/exception.php | 1 + 2 files changed, 2 insertions(+) diff --git a/index.php b/index.php index 90a5fc15..1db72830 100644 --- a/index.php +++ b/index.php @@ -24,6 +24,7 @@ * @link https://my-aac.org */ +ob_start(); require_once 'common.php'; require_once SYSTEM . 'functions.php'; diff --git a/system/exception.php b/system/exception.php index 5974fcbd..40ad3df6 100644 --- a/system/exception.php +++ b/system/exception.php @@ -43,6 +43,7 @@ function exception_handler($exception) { $content = file_get_contents($template_file); $content = str_replace(array('{{ BASE_URL }}', '{{ exceptionClass }}', '{{ message }}', '{{ backtrace }}', '{{ powered_by }}'), array(BASE_URL, get_class($exception), $message, $backtrace_formatted, base64_decode('UG93ZXJlZCBieSA8YSBocmVmPSJodHRwOi8vbXktYWFjLm9yZyIgdGFyZ2V0PSJfYmxhbmsiPk15QUFDLjwvYT4=')), $content); + @ob_clean(); echo $content; }