8000 [HttpFoundation] NativeSessionStorage `regenerate` method wrongly sets storage as started by iambrosi · Pull Request #15799 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[HttpFoundation] NativeSessionStorage regenerate method wrongly sets storage as started #15799

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fix check for active sessions in PHP >= 5.4
`session_status()` should be used in PHP >= 5.4 instead of `session_id()`.
  • Loading branch information
iambrosi committed Sep 22, 2015
commit a492a7a68f04a69b6809373ea659fe379465d993
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,12 @@ public function setName($name)
public function regenerate($destroy = false, $lifetime = null)
{
// Cannot regenerate the session ID for non-active sessions.
if ('' === session_id()) {
if (PHP_VERSION_ID >= 50400 && \PHP_SESSION_ACTIVE !== session_status()) {
return false;
}

// Check if session ID exists in PHP 5.3
if (PHP_VERSION_ID < 50400 && '' === session_id()) {
return false;
}

Expand Down
0