Skip to content

Commit 06b221d

Browse files
committed
bug fix for: Cannot change session id when session is active
1 parent d690fec commit 06b221d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Http/Sessions.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,8 @@ public function __destruct()
173173

174174
public function start($id = '')
175175
{
176-
if (!empty($id))
177-
\session_id($id);
176+
if (!empty($id) && (\session_status() == \PHP_SESSION_NONE))
177+
@\session_id($id);
178178

179179
if (\session_status() == \PHP_SESSION_NONE) {
180180
@\session_start([

0 commit comments

Comments
 (0)