From: Aaron Schulz Date: Wed, 21 Sep 2016 21:25:00 +0000 (-0700) Subject: Make Database::__clone() a bit more robust using handleSessionLoss() X-Git-Tag: 1.31.0-rc.0~5386^2 X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=commitdiff_plain;h=c0c9fe8694e231cf40c543fe32938467305982ea;p=lhc%2Fweb%2Fwiklou.git Make Database::__clone() a bit more robust using handleSessionLoss() Change-Id: I6c16abceea612a7b1167b9cca70a174fa6b77020 --- diff --git a/includes/libs/rdbms/database/Database.php b/includes/libs/rdbms/database/Database.php index 0bd1e9e71c..6f5084484c 100644 --- a/includes/libs/rdbms/database/Database.php +++ b/includes/libs/rdbms/database/Database.php @@ -3513,7 +3513,8 @@ abstract class Database implements IDatabase, LoggerAwareInterface { // Open a new connection resource without messing with the old one $this->mOpened = false; $this->mConn = false; - $this->mTrxLevel = 0; // no trx anymore + $this->mTrxEndCallbacks = []; // don't copy + $this->handleSessionLoss(); // no trx or locks anymore $this->open( $this->mServer, $this->mUser, $this->mPassword, $this->mDBname ); $this->lastPing = microtime( true ); }