Merge pull request #3878 from ceeram/optimize

minor optimisation, refs comments on 81875cfeb1b8e5c414cf9de3c96dd2dde50...
This commit is contained in:
Mark Story 2014-07-04 13:11:17 -04:00
commit eb485f82b8

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