From: Michael Date: Tue, 8 Feb 2022 21:28:42 +0000 (+0000) Subject: Don't throw an exception when the database query fails X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=14f0a1a1ed229ae8b5e779fb103204ff0c536a8b;p=friendica.git Don't throw an exception when the database query fails --- diff --git a/src/Database/Database.php b/src/Database/Database.php index cc7f754ee6..f478d7993a 100644 --- a/src/Database/Database.php +++ b/src/Database/Database.php @@ -138,6 +138,7 @@ class Database 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); $this->connected = true; } catch (PDOException $e) { $this->connected = false;