[HttpFoundation] Reload the session after regenerating its id

This commit is contained in:
Jakub Zalas 2015-07-08 20:32:24 +01:00
parent eda5cb1c27
commit 99b9c78b00
1 changed files with 7 additions and 1 deletions

View File

@ -203,7 +203,13 @@ class NativeSessionStorage implements SessionStorageInterface
$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;
}
/**