Skip to content

Commit

Permalink
Making CakeSession destory() make started() not return true. Fixing t…
Browse files Browse the repository at this point in the history
…ests that tried to modify session config while a session was active.
  • Loading branch information
markstory committed Jul 28, 2010
1 parent daab018 commit f47ee0d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cake/libs/cake_session.php
Expand Up @@ -445,7 +445,7 @@ public static function write($name, $value) {
* @return void
*/
public function destroy() {
$_SESSION = array();
$_SESSION = null;
self::$id = null;
self::init(self::$path);
self::start();
Expand Down
2 changes: 2 additions & 0 deletions cake/tests/cases/libs/cake_session.test.php
Expand Up @@ -366,6 +366,7 @@ function testCheckUserAgentTrue() {
* @return void
*/
function testReadAndWriteWithCakeStorage() {
session_write_close();
ini_set('session.save_handler', 'files');
Configure::write('Session.save', 'cake');
$this->setUp();
Expand Down Expand Up @@ -401,6 +402,7 @@ function testReadAndWriteWithCakeStorage() {
* @return void
*/
function testReadAndWriteWithCacheStorage() {
session_write_close();
ini_set('session.save_handler', 'files');
Configure::write('Session.save', 'cache');
$this->setUp();
Expand Down

0 comments on commit f47ee0d

Please sign in to comment.