mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-02 13:02:24 +08:00
Fix #17909: Reset DB schema, transaction, and driver name when the connection is closed
This commit is contained in:
@ -23,6 +23,7 @@ Yii Framework 2 Change Log
|
||||
- Bug #17875: Use `move_uploaded_file()` function instead of `copy()` and `unlink()` for saving uploaded files in case of POST request (sup-ham)
|
||||
- Bug #17884: Fix 0 values in console Table rendered as empty string (mikehaertl)
|
||||
- Bug #13749: Fix Yii opens db connection even when hits query cache (shushenghong)
|
||||
- Bug #17909: Reset DB schema, transaction, and driver name when the connection is closed (brandonkelly)
|
||||
|
||||
2.0.32 January 21, 2020
|
||||
-----------------------
|
||||
|
||||
@ -654,14 +654,16 @@ class Connection extends Component
|
||||
if ($this->pdo !== null) {
|
||||
Yii::debug('Closing DB connection: ' . $this->dsn, __METHOD__);
|
||||
$this->pdo = null;
|
||||
$this->_schema = null;
|
||||
$this->_transaction = null;
|
||||
}
|
||||
|
||||
if ($this->_slave) {
|
||||
$this->_slave->close();
|
||||
$this->_slave = false;
|
||||
}
|
||||
|
||||
$this->_schema = null;
|
||||
$this->_transaction = null;
|
||||
$this->_driverName = null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user