summaryrefslogtreecommitdiffstats
path: root/system/database
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2013-10-21 12:58:15 +0200
committerAndrey Andreev <narf@devilix.net>2013-10-21 12:58:15 +0200
commit6c85442746c46009cdf3fe517465e174a91cc4c5 (patch)
treea92a67bbc2920fff3e4cc7cf8955bd34681b1b5c /system/database
parente08411d72226ba5b2f97b519051f78d978747e18 (diff)
Fix #2691
Diffstat (limited to 'system/database')
-rw-r--r--system/database/DB_driver.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php
index 618f3660c..9aa6c5de5 100644
--- a/system/database/DB_driver.php
+++ b/system/database/DB_driver.php
@@ -624,7 +624,14 @@ abstract class CI_DB_driver {
// 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_depth > 0 && $this->trans_complete();
+ if ($this->_trans_depth !== 0)
+ {
+ do
+ {
+ $this->trans_complete();
+ }
+ while ($this->_trans_depth !== 0);
+ }
// Display errors
return $this->display_error(array('Error Number: '.$error['code'], $error['message'], $sql));