database: make close() sanity check mTrxPreCommitCallbacks
The other callback types are already checked too. Change-Id: Ibdc82110c0a0e74bb07ed92ee667bdf0d9f69f90
This commit is contained in:
parent
a70c4a4c46
commit
a619be8163
1 changed files with 5 additions and 1 deletions
|
|
@ -758,7 +758,11 @@ abstract class Database implements IDatabase, IMaintainableDatabase, LoggerAware
|
|||
|
||||
$closed = $this->closeConnection();
|
||||
$this->mConn = false;
|
||||
} elseif ( $this->mTrxIdleCallbacks || $this->mTrxEndCallbacks ) { // sanity
|
||||
} elseif (
|
||||
$this->mTrxIdleCallbacks ||
|
||||
$this->mTrxPreCommitCallbacks ||
|
||||
$this->mTrxEndCallbacks
|
||||
) { // sanity
|
||||
throw new RuntimeException( "Transaction callbacks still pending." );
|
||||
} else {
|
||||
$closed = true;
|
||||
|
|
|
|||
Loading…
Reference in a new issue