Skip to content

Commit

Permalink
Check here too if session is actually active.
Browse files Browse the repository at this point in the history
  • Loading branch information
yunosh committed Mar 15, 2016
1 parent 7c8d23a commit 3924627
Showing 1 changed file with 9 additions and 1 deletion.
Expand Up @@ -114,11 +114,19 @@ public function tearDown()
}
}

/**
* @todo Rely on session_status() in H6.
*/
public static function tearDownAfterClass()
{
parent::tearDownAfterClass();
unset($_SESSION);
session_destroy();
if ((function_exists('session_status') &&
session_status() == PHP_SESSION_ACTIVE) ||
(!function_exists('session_status') &&
session_id())) {
session_destroy();
}
session_name(ini_get('session.name'));
}

Expand Down

0 comments on commit 3924627

Please sign in to comment.