Avoid PDO exceptions in PHP 8

This commit is contained in:
Jakub Vrana 2020-12-06 13:50:13 +01:00
parent b0a217abdd
commit 0618429bce

View file

@ -18,6 +18,7 @@ if (extension_loaded('pdo')) {
} catch (Exception $ex) {
auth_error(h($ex->getMessage()));
}
$this->pdo->setAttribute(3, 1); // 3 - PDO::ATTR_ERRMODE, 1 - PDO::ERRMODE_WARNING
$this->pdo->setAttribute(13, array('Min_PDOStatement')); // 13 - PDO::ATTR_STATEMENT_CLASS
$this->server_info = @$this->pdo->getAttribute(4); // 4 - PDO::ATTR_SERVER_VERSION
}