diff options
author | Timothy Warren <tim@timshomepage.net> | 2012-03-02 15:07:04 +0100 |
---|---|---|
committer | Timothy Warren <tim@timshomepage.net> | 2012-03-02 15:07:04 +0100 |
commit | d33dab14c5d812d30f48d9a5f6324bb230e77203 (patch) | |
tree | 9f56e656e54c68d4a971b7985269f3c1cba1c696 /system/database/DB_driver.php | |
parent | eabc5ec81209ec83393222f2964098aedf6dbc7a (diff) | |
parent | 4be5de1d11eefd9f0b7cf0589a2942f067cefe35 (diff) |
Merge upstream
Diffstat (limited to 'system/database/DB_driver.php')
-rw-r--r-- | system/database/DB_driver.php | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php index 7da4b1ac8..075cab2c9 100644 --- a/system/database/DB_driver.php +++ b/system/database/DB_driver.php @@ -330,30 +330,28 @@ class CI_DB_driver { // This will trigger a rollback if transactions are being used $this->_trans_status = FALSE; - // Grab the error number and message now, as we might run some - // additional queries before displaying the error - $error_no = $this->_error_number(); - $error_msg = $this->_error_message(); + // Grab the error now, as we might run some additional queries before displaying the error + $error = $this->error(); // Log errors - log_message('error', 'Query error: '.$error_msg); + log_message('error', 'Query error: '.$error['message']); if ($this->db_debug) { // We call this function in order to roll-back queries - // if transactions are enabled. If we don't call this here + // if transactions are enabled. If we don't call this here // the error message will trigger an exit, causing the // transactions to remain in limbo. $this->trans_complete(); // Display errors return $this->display_error( - array( - 'Error Number: '.$error_no, - $error_msg, - $sql - ) - ); + array( + 'Error Number: '.$error['code'], + $error['message'], + $sql + ) + ); } return FALSE; |