From a1bcb12f203a08e33ea1514ea2389d45c439412b Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Wed, 13 May 2020 09:11:41 +0200 Subject: [PATCH] Fix exception error --- public/main/inc/lib/database.lib.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/public/main/inc/lib/database.lib.php b/public/main/inc/lib/database.lib.php index 026d40218f..d09632ca23 100644 --- a/public/main/inc/lib/database.lib.php +++ b/public/main/inc/lib/database.lib.php @@ -6,7 +6,6 @@ use Doctrine\DBAL\Connection; use Doctrine\DBAL\Driver\Statement; use Doctrine\DBAL\Types\Type; use Doctrine\ORM\EntityManager; -use Symfony\Component\Debug\ExceptionHandler; /** * Class Database. @@ -286,11 +285,9 @@ class Database */ public static function handleError($e) { - $debug = 'test' == api_get_setting('server_type'); + $debug = 'test' === api_get_setting('server_type'); if ($debug) { - // We use Symfony exception handler for better error information - $handler = new ExceptionHandler(); - $handler->handle($e); + throw $e; exit; } else { error_log($e->getMessage());