From d9270d8ef88982f99de7217e7b7fa226c41a63a1 Mon Sep 17 00:00:00 2001 From: Dave MacFarlane Date: Wed, 8 Mar 2023 09:45:47 -0500 Subject: [PATCH] take out of try/catch for debugging --- php/libraries/Database.class.inc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/php/libraries/Database.class.inc b/php/libraries/Database.class.inc index d00995a7a93..512ad158bae 100644 --- a/php/libraries/Database.class.inc +++ b/php/libraries/Database.class.inc @@ -108,6 +108,11 @@ class Database implements LoggerAwareInterface } + $this->_PDO = new PDO( + "mysql:host=$host;dbname=$database;charset=UTF8", + $username, + $password + ); try { $this->_PDO = new PDO( "mysql:host=$host;dbname=$database;charset=UTF8", @@ -117,6 +122,7 @@ class Database implements LoggerAwareInterface } catch (PDOException $e) { // This exception will not be included in the error log as it will // likely include credentials. + throw $e; throw new DatabaseException( "Could not establish a PDO object using the following values: " . "username: `$username`, dbname: `$database`, host: `$host` "