Skip to content

Commit

Permalink
minor #36274 [HttpFoundation] No need to reconnect the bags to the se…
Browse files Browse the repository at this point in the history
…ssion after session_regenerate_id (rosier)

This PR was merged into the 3.4 branch.

Discussion
----------

[HttpFoundation] No need to reconnect the bags to the session after session_regenerate_id

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -

Bug https://bugs.php.net/70013 was fixed before the release of PHP v7.0

https://3v4l.org/A8YmY

Related to #15243

Commits
-------

923c24f No need to reconnect the bags to the session
  • Loading branch information
fabpot committed Apr 4, 2020
2 parents 6254cdb + 923c24f commit 21a6ab0
Showing 1 changed file with 0 additions and 4 deletions.
Expand Up @@ -223,10 +223,6 @@ public function regenerate($destroy = false, $lifetime = null)

$isRegenerated = session_regenerate_id($destroy);

// The reference to $_SESSION in session bags is lost in PHP7 and we need to re-create it.
// @see https://bugs.php.net/70013
$this->loadSession();

if (null !== $this->emulateSameSite) {
$originalCookie = SessionUtils::popSessionCookie(session_name(), session_id());
if (null !== $originalCookie) {
Expand Down

0 comments on commit 21a6ab0

Please sign in to comment.