minor optimisation, refs comments on 81875cfeb1

This commit is contained in:
Ceeram 2014-07-04 17:25:33 +02:00
parent 1eccec02e4
commit a266a9493d

View file

@ -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);