Skip to content

Commit

Permalink
[HttpFoundation] Reload the session after regenerating its id
Browse files Browse the repository at this point in the history
  • Loading branch information
jakzal committed Jul 8, 2015
1 parent eda5cb1 commit 99b9c78
Showing 1 changed file with 7 additions and 1 deletion.
Expand Up @@ -203,7 +203,13 @@ public function regenerate($destroy = false, $lifetime = null)
$this->metadataBag->stampNew();
}

return session_regenerate_id($destroy);
$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/bug.php?id=70013
$this->loadSession();

return $isRegenerated;
}

/**
Expand Down

0 comments on commit 99b9c78

Please sign in to comment.