From: Andrew Dolgov Date: Mon, 3 Sep 2018 09:30:26 +0000 (+0300) Subject: PDO: switch error reporting to exceptions X-Git-Tag: 18.12~80 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=01d22e255f7a026bb0b0324cde1d8a8756c84a20;p=tt-rss.git PDO: switch error reporting to exceptions --- diff --git a/classes/db.php b/classes/db.php index 96a88827..e9d9e841 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 +}