Browse Source

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

tags/2.0.33
Brandon Kelly 5 years ago committed by GitHub
parent
commit
1b5dacb051
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      framework/CHANGELOG.md
  2. 6
      framework/db/Connection.php

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

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

Loading…
Cancel
Save