Upgrade mismatched commit() warnings to exceptions
[lhc/web/wiklou.git] / includes / db / Database.php
index bd1e375..ef4a7b7 100644 (file)
@@ -2654,7 +2654,10 @@ abstract class DatabaseBase implements IDatabase {
                        if ( !$this->mTrxLevel ) {
                                return; // nothing to do
                        } elseif ( !$this->mTrxAutomatic ) {
-                               wfWarn( "$fname: Flushing an explicit transaction, getting out of sync!" );
+                               throw new DBUnexpectedError(
+                                       $this,
+                                       "$fname: Flushing an explicit transaction, getting out of sync!"
+                               );
                        }
                } else {
                        if ( !$this->mTrxLevel ) {