Skip to content

Commit

Permalink
[HttpFoundation] fixed issue with session_regenerate_id (closes #7380)
Browse files Browse the repository at this point in the history
  • Loading branch information
fabpot committed Jun 13, 2013
1 parent ed3bcb0 commit 77f2aa8
Showing 1 changed file with 9 additions and 1 deletion.
Expand Up @@ -205,7 +205,15 @@ public function regenerate($destroy = false, $lifetime = null)
$this->metadataBag->stampNew();
}

return session_regenerate_id($destroy);
$ret = session_regenerate_id($destroy);

// workaround for https://bugs.php.net/bug.php?id=61470 as suggested by David Grudl
session_write_close();
$backup = $_SESSION;
session_start();
$_SESSION = $backup;

return $ret;
}

/**
Expand Down

0 comments on commit 77f2aa8

Please sign in to comment.