From: Aaron Schulz Date: Thu, 11 Aug 2016 03:16:12 +0000 (-0700) Subject: Upgrade unmatched explicit commit() of DBO_TRX to an exception X-Git-Tag: 1.31.0-rc.0~6093 X-Git-Url: http://git.cyclocoop.org/fichier?a=commitdiff_plain;h=a2242913b2e27e46f616b8885102d4bf1b8583f2;p=lhc%2Fweb%2Fwiklou.git Upgrade unmatched explicit commit() of DBO_TRX to an exception Follows-up f8d5075656 and 820f5d6ce5. This mostly for sanity, as normally the exception would happen on begin(). Change-Id: I2c2fb20ed5184d3c00d3050e929a11e3e37f50f4 --- diff --git a/includes/db/Database.php b/includes/db/Database.php index ba25183e46..c591f3ce4b 100644 --- a/includes/db/Database.php +++ b/includes/db/Database.php @@ -2718,7 +2718,10 @@ abstract class DatabaseBase implements IDatabase { wfWarn( "$fname: No transaction to commit, something got out of sync!" ); return; // nothing to do } elseif ( $this->mTrxAutomatic ) { - wfWarn( "$fname: Explicit commit of implicit transaction. Something may be out of sync!" ); + throw new DBUnexpectedError( + $this, + "$fname: Explicit commit of implicit transaction." + ); } }