From 68fbc2112ec0d4968720706f95ccc08227d6b9a8 Mon Sep 17 00:00:00 2001 From: Ian Date: Wed, 29 May 2013 15:05:16 +0200 Subject: [PATCH] bind production mode view errors to admin users --- include/compat.inc.php | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/include/compat.inc.php b/include/compat.inc.php index c541634b..190b7ced 100644 --- a/include/compat.inc.php +++ b/include/compat.inc.php @@ -133,15 +133,17 @@ if (!function_exists('errorToExceptionHandler')) { exit; // make sure to exit in case of database connection errors. } if ($serendipity['production'] === true) { - // ToDo: enhance for more special serendipity error needs - $str = '

== SERENDIPITY ERROR ==

'; - $str .= '

Please correct:

'; - $str .= '

' . $errStr . ' in ' . $errFile . ' on line ' . $errLine . '

'; - if (headers_sent()) { - serendipity_die($str); // case HTTP headers: needs to halt with die() here, else it will path through and gets written underneath blog content, which hardly isn't seen by many users - } else { - // this also reacts on non eye-displayed errors with following small javascript, while being in tags like