From 01d22e255f7a026bb0b0324cde1d8a8756c84a20 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 3 Sep 2018 12:30:26 +0300 Subject: [PATCH] PDO: switch error reporting to exceptions --- classes/db.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/classes/db.php b/classes/db.php index 96a888275..e9d9e8417 100644 --- a/classes/db.php +++ b/classes/db.php @@ -63,7 +63,7 @@ class Db exit(101); } - $this->pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING); + $this->pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); if (DB_TYPE == "pgsql") { @@ -102,4 +102,4 @@ class Db return self::$instance->pdo; } -} \ No newline at end of file +}