Skip to content

Commit 0b147f9

Browse files
committed
Make the PDO driver always throw exceptions on failed queries.
1 parent 8888916 commit 0b147f9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

system/database/drivers/pdo/pdo_driver.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,9 @@ class CI_DB_pdo_driver extends CI_DB {
6565
*
6666
* @var array
6767
*/
68-
public $options = array();
68+
public $options = array(
69+
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
70+
);
6971

7072
// --------------------------------------------------------------------
7173

0 commit comments

Comments
 (0)