diff --git a/lib/SimpleSAML/Consent/ConsentStorage.php b/lib/SimpleSAML/Consent/ConsentStorage.php index f92c362fe1d7384361297ffefc164953bf561e3a..fedc765add6dd8aecec90c0dae47eb3ae38ae1ef 100644 --- a/lib/SimpleSAML/Consent/ConsentStorage.php +++ b/lib/SimpleSAML/Consent/ConsentStorage.php @@ -37,9 +37,13 @@ class SimpleSAML_Consent_Storage { $pdo_user = $config->getValue('consent_pdo_user'); $pdo_passwd = $config->getValue('consent_pdo_passwd'); - $this->dbh = new PDO($pdo_connect, $pdo_user, $pdo_passwd, - array( PDO::ATTR_PERSISTENT => false)); - + try { + $this->dbh = new PDO($pdo_connect, $pdo_user, $pdo_passwd, + array( PDO::ATTR_PERSISTENT => false)); + } catch(Exception $exception) { + $session = SimpleSAML_Session::getInstance(TRUE); + SimpleSAML_Utilities::fatalError($session->getTrackID(), 'PROCESSASSERTION', $exception); + } //$this->dbh->setAttribute('PDO::ATTR_TIMEOUT', 5); }