Update src/Database/Database.php

Co-authored-by: Hypolite Petovan <hypolite@mrpetovan.com>
This commit is contained in:
k-alin 2022-02-25 16:09:54 +01:00 committed by GitHub
parent 8a10b0c635
commit e4cfd4a7c3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -136,11 +136,11 @@ class Database
$connect .= ";charset=" . $charset;
}
if ($socket) {
$connect .= ";$unix_socket=" . $socket;
}
if ($socket) {
$connect .= ";$unix_socket=" . $socket;
}
try {
try {
$this->connection = @new PDO($connect, $user, $pass, [PDO::ATTR_PERSISTENT => $persistent]);
$this->connection->setAttribute(PDO::ATTR_EMULATE_PREPARES, $this->pdo_emulate_prepares);
$this->connection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_SILENT);