openrat-cms

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 2b431e2006660d9d2ad1f025eec2ab0c6b0ea6d8
parent ae5c353feed782eeca7f4f23cb774d34c00238bf
Author: Jan Dankert <devnull@localhost>
Date:   Sun,  9 Dec 2018 23:34:48 +0100

Im Developer-Mode alle Fehler ausgeben. Im Produktions-Mode alle Fehler unterdr├╝cken.

Diffstat:
modules/cms-core/Dispatcher.class.php | 11+++++++++++
1 file changed, 11 insertions(+), 0 deletions(-)

diff --git a/modules/cms-core/Dispatcher.class.php b/modules/cms-core/Dispatcher.class.php @@ -54,6 +54,17 @@ class Dispatcher define('PRODUCTION', Conf()->is('production')); define('DEVELOPMENT', !PRODUCTION); + if( DEVELOPMENT) + { + ini_set('display_errors', 1); + ini_set('display_startup_errors', 1); + error_reporting(E_ALL); + }else { + ini_set('display_errors', 0); + ini_set('display_startup_errors', 0); + error_reporting(0); + } + $this->setContentLanguageHeader(); // Nachdem die Konfiguration gelesen wurde, kann nun der Logger benutzt werden.