Better exception handler, which clears the whole html output, so the message is better visible

This commit is contained in:
slawkens 2025-01-27 21:29:43 +01:00
parent d390ea325e
commit c304a9ab43
2 changed files with 2 additions and 0 deletions

View File

@ -24,6 +24,7 @@
* @link https://my-aac.org
*/
ob_start();
require_once 'common.php';
require_once SYSTEM . 'functions.php';

View File

@ -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;
}