From 3de2a4022e7849a69fa2b6be5d0ed2dfb4dd57c2 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Wed, 25 Jun 2014 10:17:21 -0700 Subject: [PATCH] Made DB rollback() method properly bail out if no trx is active Change-Id: I157b3c9e7a869866c08d127cb7f9277582e1bc9e --- includes/db/Database.php | 1 + 1 file changed, 1 insertion(+) 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!" ); } -- 2.20.1