8000 [Session] remove invalid workaround in session regenerate · symfony/symfony@24ce800 · GitHub
[go: up one dir, main page]

Skip to content

Commit 24ce800

Browse files
committed
[Session] remove invalid workaround in session regenerate
The original issue #7380 was just caused because the developer missed to save the session before doing the redirect. That's all. This reverts #8270 and following.
1 parent 20e7cf1 commit 24ce800

File tree

1 file changed

+1
-17
lines changed

1 file changed

+1
-17
lines changed

src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -206,23 +206,7 @@ public function regenerate($destroy = false, $lifetime = null)
206206
$this->metadataBag->stampNew();
207207
}
208208

209-
$ret = session_regenerate_id($destroy);
210-
211-
// workaround for https://bugs.php.net/bug.php?id=61470 as suggested by David Grudl
212-
if ('files' === $this->getSaveHandler()->getSaveHandlerName()) {
213-
session_write_close();
214-
if (isset($_SESSION)) {
215-
$backup = $_SESSION;
216-
session_start();
217-
$_SESSION = $backup;
218-
} else {
219-
session_start();
220-
}
221-
222-
$this->loadSession();
223-
}
224-
225-
return $ret;
209+
return session_regenerate_id($destroy);
226210
}
227211

228212
/**

0 commit comments

Comments
 (0)
0