diff --git a/composer.json b/composer.json index fdfde307..86f56c21 100755 --- a/composer.json +++ b/composer.json @@ -24,7 +24,6 @@ "flextype-components/cookie" : "1.2.0", "flextype-components/date" : "1.0.0", "flextype-components/debug" : "1.0.0", - "flextype-components/errorhandler" : "1.0.5", "flextype-components/filesystem" : "2.0.3", "flextype-components/i18n" : "1.2.0", "flextype-components/number" : "1.1.0", diff --git a/flextype/bootstrap.php b/flextype/bootstrap.php index 189b4d21..2c5c6463 100755 --- a/flextype/bootstrap.php +++ b/flextype/bootstrap.php @@ -78,11 +78,6 @@ $flextype['csrf'] = function ($container) { */ $app->add($flextype->get('csrf')); -/** - * as - */ -$app->add(new \Zeuxisoo\Whoops\Provider\Slim\WhoopsMiddleware($app)); - /** * Add emitter service to Flextype container */ @@ -147,22 +142,16 @@ function_exists('mb_internal_encoding') and mb_internal_encoding($flextype['regi // Display Errors if ($flextype['registry']->get('settings.errors.display')) { - //define('DEVELOPMENT', true); - error_reporting(-1); + + /** + * Add WhoopsMiddleware + */ + $app->add(new \Zeuxisoo\Whoops\Provider\Slim\WhoopsMiddleware($app)); + } else { - //define('DEVELOPMENT', false); error_reporting(0); } -// Create directory for logs -!Filesystem::has(LOGS_PATH) and Filesystem::createDir(LOGS_PATH); - -// Set Error handler -//set_error_handler('Flextype\Component\ErrorHandler\ErrorHandler::error'); -//register_shutdown_function('Flextype\Component\ErrorHandler\ErrorHandler::fatal'); -//set_exception_handler('Flextype\Component\ErrorHandler\ErrorHandler::exception'); - - // Set default timezone date_default_timezone_set($flextype['registry']->get('settings.timezone'));