mirror of
https://gitlab.com/ruany/litebans-php.git
synced 2025-05-23 16:32:45 +00:00
Enable PDO exception mode
This commit is contained in:
parent
636f33205a
commit
c2a95a955d
@ -67,6 +67,7 @@ final class Settings {
|
||||
} catch (PDOException $e) {
|
||||
die('Connection failed: ' . $e->getMessage());
|
||||
}
|
||||
$this->conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||
if ($driver === 'pgsql') {
|
||||
$this->conn->query("SET NAMES 'UTF8';");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user