Fix #17909: Reset DB schema, transaction, and driver name when the connection is closed

This commit is contained in:
Brandon Kelly
2020-03-12 14:15:57 -07:00
committed by GitHub
parent 5939813a8e
commit 1b5dacb051
2 changed files with 5 additions and 2 deletions

View File

@ -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
-----------------------

View File

@ -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;
}
/**