diff --git a/codepot/src/system/database/drivers/pdo/pdo_driver.php b/codepot/src/system/database/drivers/pdo/pdo_driver.php index 29b2cd01..899654df 100644 --- a/codepot/src/system/database/drivers/pdo/pdo_driver.php +++ b/codepot/src/system/database/drivers/pdo/pdo_driver.php @@ -273,7 +273,13 @@ class CI_DB_pdo_driver extends CI_DB { function _execute($sql) { $sql = $this->_prep_query($sql); - $result_id = new CI_DB_pdo_statement_wrapper($this->conn_id->prepare($sql)); + $stmt = $this->conn_id->prepare($sql); + if ($stmt === FALSE) + { + $this->affect_rows = 0; + return FALSE; + } + $result_id = new CI_DB_pdo_statement_wrapper($stmt); if (is_object($result_id) && $result_id->execute()) {