mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
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:
parent
65f67c0c2e
commit
12f99cd1e9
1 changed files with 8 additions and 4 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Reference in a new issue