diff --git a/framework/CHANGELOG.md b/framework/CHANGELOG.md index 501a63353c..5fdd1f2de8 100644 --- a/framework/CHANGELOG.md +++ b/framework/CHANGELOG.md @@ -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 ----------------------- diff --git a/framework/db/Connection.php b/framework/db/Connection.php index 184e9c69de..0dbe214109 100644 --- a/framework/db/Connection.php +++ b/framework/db/Connection.php @@ -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; } /**