8000 [HttpFoundation] fixed issue with session_regenerate_id (closes #7380) by fabpot · Pull Request #8270 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[HttpFoundation] fixed issue with session_regenerate_id (closes #7380) #8270

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

Merged
merged 1 commit into from
Jun 13, 2013
Merged
Changes from all commits
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
Original file line number Diff line number Diff line change
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