From f85fad447eb758f81756a01fefc7927c43ab06b6 Mon Sep 17 00:00:00 2001 From: tobi132 Date: Tue, 3 Dec 2019 00:52:28 +0100 Subject: [PATCH] This is actually better approach to this problem Show only message without trace --- system/database.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/system/database.php b/system/database.php index d0f3fbda..4ca57a77 100644 --- a/system/database.php +++ b/system/database.php @@ -110,12 +110,11 @@ defined('MYAAC') or die('Direct access not allowed!'); return; // installer will take care of this } - die('ERROR: Cannot connect to MySQL database.
' . + throw new RuntimeException('ERROR: Cannot connect to MySQL database.
' . 'Possible reasons:' . '' . $error); + '' . $error->getMessage()); - } -?> \ No newline at end of file + } \ No newline at end of file