Adding fix for Ticket #2287

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4670 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
phpnut 2007-03-25 00:33:57 +00:00
parent 65f67c0c2e
commit 12f99cd1e9

View file

@ -391,6 +391,8 @@ class CakeSession extends Object {
if (isset($_COOKIE[session_name()])) {
setcookie(CAKE_SESSION_COOKIE, '', time() - 42000, $this->path);
}
$_SESSION = array();
$file = $sessionpath . DS . "sess_" . session_id();
@session_destroy();
@unlink ($file);
@ -573,13 +575,15 @@ class CakeSession extends Object {
}
session_regenerate_id();
$newSessid = session_id();
$file = $sessionpath . DS . "sess_$oldSessionId";
@unlink ($file);
@session_destroy ($oldSessionId);
if (function_exists('session_write_close')) {
session_write_close();
}
session_id($oldSessionId);
session_start();
session_destroy();
$file = $sessionpath . DS . "sess_$oldSessionId";
@unlink($file);
$this->__initSession();
session_id ($newSessid);
session_start();