Skip to content

Commit 688e56d

Browse files
committed
Properly initialize PS(mod) on RINIT
We need to do that in case a user handler has been set. However, we can't do that in `php_rinit_session_globals()` since that function is called by PHP function `session_destroy()` too, but in that case we don't want to reset PS(mod). Closes GH-6795.
1 parent 838951c commit 688e56d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ext/session/session.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2855,7 +2855,8 @@ static int php_rinit_session(zend_bool auto_start) /* {{{ */
28552855
{
28562856
php_rinit_session_globals();
28572857

2858-
if (PS(mod) == NULL) {
2858+
PS(mod) = NULL;
2859+
{
28592860
char *value;
28602861

28612862
value = zend_ini_string("session.save_handler", sizeof("session.save_handler") - 1, 0);

0 commit comments

Comments
 (0)