database: make close() sanity check mTrxPreCommitCallbacks
[lhc/web/wiklou.git] / includes / libs / rdbms / database / Database.php
index 7349b63..cec13b5 100644 (file)
@@ -758,7 +758,11 @@ abstract class Database implements IDatabase, IMaintainableDatabase, LoggerAware
 
                        $closed = $this->closeConnection();
                        $this->mConn = false;
-               } elseif ( $this->mTrxIdleCallbacks || $this->mTrxEndCallbacks ) { // sanity
+               } elseif (
+                       $this->mTrxIdleCallbacks ||
+                       $this->mTrxPreCommitCallbacks ||
+                       $this->mTrxEndCallbacks
+               ) { // sanity
                        throw new RuntimeException( "Transaction callbacks still pending." );
                } else {
                        $closed = true;