summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--system/database/DB_driver.php11
-rw-r--r--user_guide/changelog.html2
2 files changed, 9 insertions, 4 deletions
diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php
index 306f09d7d..a0833d0ce 100644
--- a/system/database/DB_driver.php
+++ b/system/database/DB_driver.php
@@ -308,18 +308,23 @@ class CI_DB_driver {
if ($this->db_debug)
{
+ // 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();
+
// We call this function in order to roll-back queries
// 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();
-
+
// Log and display errors
log_message('error', 'Query error: '.$this->_error_message());
return $this->display_error(
array(
- 'Error Number: '.$this->_error_number(),
- $this->_error_message(),
+ 'Error Number: '.$error_no,
+ $error_msg,
$sql
)
);
diff --git a/user_guide/changelog.html b/user_guide/changelog.html
index 8faf8aabc..6dc818ed5 100644
--- a/user_guide/changelog.html
+++ b/user_guide/changelog.html
@@ -64,7 +64,7 @@ SVN Revision: not currently released</p>
<h2>Version 1.6.2</h2>
<p>Release Date: May 13, 2008<br />
-SVN Revision: 1152</p>
+SVN Revision: 1153</p>
<ul>
<li>Active Record
<ul>