Skip to content
Permalink
Browse files

session bugfix

  • Loading branch information...
steefaan committed Aug 26, 2014
1 parent ff3273d commit 66ccfaf5e238181946a16c98c8ea3e64faa513af
@@ -267,7 +267,7 @@ public static function id($id = null) {
* @return bool Success
*/
public static function delete($name) {
if (self::check($name)) {
if (self::start() && self::check($name)) {
self::_overwrite($_SESSION, Hash::remove($_SESSION, $name));
return !self::check($name);
}
@@ -365,6 +365,12 @@ public function testStarted() {
* @return void
*/
public function testDelete() {
$this->assertTrue(TestCakeSession::write('Delete.me', 'Clearing out'));
session_write_close();
$this->assertTrue(TestCakeSession::delete('Delete.me'));
$this->assertFalse(TestCakeSession::check('Delete.me'));
$this->assertTrue(TestCakeSession::write('Delete.me', 'Clearing out'));
$this->assertTrue(TestCakeSession::delete('Delete.me'));
$this->assertFalse(TestCakeSession::check('Delete.me'));

0 comments on commit 66ccfaf

Please sign in to comment.
You can’t perform that action at this time.