Skip to content

Commit d9270d8

Browse files
committed
take out of try/catch for debugging
1 parent b5220ce commit d9270d8

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

php/libraries/Database.class.inc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,11 @@ class Database implements LoggerAwareInterface
108108

109109
}
110110

111+
$this->_PDO = new PDO(
112+
"mysql:host=$host;dbname=$database;charset=UTF8",
113+
$username,
114+
$password
115+
);
111116
try {
112117
$this->_PDO = new PDO(
113118
"mysql:host=$host;dbname=$database;charset=UTF8",
@@ -117,6 +122,7 @@ class Database implements LoggerAwareInterface
117122
} catch (PDOException $e) {
118123
// This exception will not be included in the error log as it will
119124
// likely include credentials.
125+
throw $e;
120126
throw new DatabaseException(
121127
"Could not establish a PDO object using the following values: "
122128
. "username: `$username`, dbname: `$database`, host: `$host` "

0 commit comments

Comments
 (0)