mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 11:06:15 +00:00
minor optimisation, refs comments on 81875cfeb1
This commit is contained in:
parent
1eccec02e4
commit
a266a9493d
1 changed files with 2 additions and 3 deletions
|
@ -714,11 +714,10 @@ class CakeSession {
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public static function renew() {
|
public static function renew() {
|
||||||
$id = session_id();
|
if (!session_id()) {
|
||||||
if (!$id) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ($id || isset($_COOKIE[session_name()])) {
|
if (isset($_COOKIE[session_name()])) {
|
||||||
setcookie(Configure::read('Session.cookie'), '', time() - 42000, self::$path);
|
setcookie(Configure::read('Session.cookie'), '', time() - 42000, self::$path);
|
||||||
}
|
}
|
||||||
session_regenerate_id(true);
|
session_regenerate_id(true);
|
||||||
|
|
Loading…
Add table
Reference in a new issue