From a266a9493d9262d96ccedf70ba517e99f9e95724 Mon Sep 17 00:00:00 2001 From: Ceeram Date: Fri, 4 Jul 2014 17:25:33 +0200 Subject: [PATCH] minor optimisation, refs comments on 81875cfeb1b8e5c414cf9de3c96dd2dde50150bc --- lib/Cake/Model/Datasource/CakeSession.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/Cake/Model/Datasource/CakeSession.php b/lib/Cake/Model/Datasource/CakeSession.php index b50d838de..695bd2ef6 100644 --- a/lib/Cake/Model/Datasource/CakeSession.php +++ b/lib/Cake/Model/Datasource/CakeSession.php @@ -714,11 +714,10 @@ class CakeSession { * @return void */ public static function renew() { - $id = session_id(); - if (!$id) { + if (!session_id()) { return; } - if ($id || isset($_COOKIE[session_name()])) { + if (isset($_COOKIE[session_name()])) { setcookie(Configure::read('Session.cookie'), '', time() - 42000, self::$path); } session_regenerate_id(true);