summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDerek Jones <derek.jones@ellislab.com>2008-05-13 22:28:11 +0200
committerDerek Jones <derek.jones@ellislab.com>2008-05-13 22:28:11 +0200
commitf38fe09dfecde176dc2803dd6a55177666f7d616 (patch)
treed87a44ada86e8de8e40a1dec1e1c91c92d3bc103
parent516841eaaefec8c7093d2cf37fc4b1be127e7580 (diff)
hotfix for a bug in database error display introduced by 1.6.2 fix for bugs #4451, #4299, and #4339
-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>