Skip to content

Commit

Permalink
minor optimisation, refs comments on 81875cf
Browse files Browse the repository at this point in the history
  • Loading branch information
ceeram committed Jul 4, 2014
1 parent 1eccec0 commit a266a94
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/Cake/Model/Datasource/CakeSession.php
Expand Up @@ -714,11 +714,10 @@ protected static function _writeConfig() {
* @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);
Expand Down

0 comments on commit a266a94

Please sign in to comment.