mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Close the session out before erasing all the fixtures.
Not closing the session before closing fixtures results in fatal errors when using database sessions. Fixes #3683
This commit is contained in:
parent
3b7b322d41
commit
0ba1aa6d38
1 changed files with 6 additions and 0 deletions
|
@ -264,9 +264,15 @@ class CakeFixtureManager {
|
|||
/**
|
||||
* Drop all fixture tables loaded by this class
|
||||
*
|
||||
* This will also close the session, as failing to do so will cause
|
||||
* fatal errors with database sessions.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function shutDown() {
|
||||
if (session_id()) {
|
||||
session_write_close();
|
||||
}
|
||||
foreach ($this->_loaded as $fixture) {
|
||||
if (!empty($fixture->created)) {
|
||||
foreach ($fixture->created as $ds) {
|
||||
|
|
Loading…
Reference in a new issue