diff options
author | Andrey Andreev <narf@bofh.bg> | 2012-03-02 14:45:41 +0100 |
---|---|---|
committer | Andrey Andreev <narf@bofh.bg> | 2012-03-02 14:45:41 +0100 |
commit | 4be5de1d11eefd9f0b7cf0589a2942f067cefe35 (patch) | |
tree | 6b360e221710377c2de0f3360e6c11a9ba1e9d6b /system/database/DB_driver.php | |
parent | bcb3bbb97c8c046f80009a2bd8dffb96795ed239 (diff) |
Replaced DB methods _error_message() and _error_number() with error() (issue #1097)
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 5f435e363..03a222f9b 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; |