mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Merge pull request #3878 from ceeram/optimize
minor optimisation, refs comments on 81875cfeb1b8e5c414cf9de3c96dd2dde50...
This commit is contained in:
commit
eb485f82b8
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…
Reference in a new issue