From: Aaron Schulz Date: Wed, 25 Jun 2014 17:17:21 +0000 (-0700) Subject: Made DB rollback() method properly bail out if no trx is active X-Git-Tag: 1.31.0-rc.0~15239^2 X-Git-Url: http://git.cyclocoop.org/%7D%7Cconcat%7B?a=commitdiff_plain;h=3de2a4022e7849a69fa2b6be5d0ed2dfb4dd57c2;p=lhc%2Fweb%2Fwiklou.git Made DB rollback() method properly bail out if no trx is active Change-Id: I157b3c9e7a869866c08d127cb7f9277582e1bc9e --- diff --git a/includes/db/Database.php b/includes/db/Database.php index 7bbcc2ffe4..4ff38c5f24 100644 --- a/includes/db/Database.php +++ b/includes/db/Database.php @@ -3525,6 +3525,7 @@ abstract class DatabaseBase implements IDatabase, DatabaseType { if ( $flush !== 'flush' ) { if ( !$this->mTrxLevel ) { wfWarn( "$fname: No transaction to rollback, something got out of sync!" ); + return; // nothing to do } elseif ( $this->mTrxAutomatic ) { wfWarn( "$fname: Explicit rollback of implicit transaction. Something may be out of sync!" ); }