EllisLab/CodeIgniter — pull request #2266 by dionysiosarvanitis (2013-02-19 21:13:19+00:00)
Title: DB_driver's trans_complete exception fix

When not in a transaction, any calls of trans_complete (DB_driver.php, L628) causes exception with message "There is no active transaction" (tested in PDO). So, debugging information passed to consecutive call of display_error has been lost.

It would be useful to test before closing the transaction by
$this->_trans_depth > 0 && $this->trans_complete();