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.
This commit is contained in:
Christoph M. Becker 2021-03-22 13:21:07 +01:00
parent 838951c2d6
commit 688e56d0ac

View file

@ -2855,7 +2855,8 @@ static int php_rinit_session(zend_bool auto_start) /* {{{ */
{
php_rinit_session_globals();
if (PS(mod) == NULL) {
PS(mod) = NULL;
{
char *value;
value = zend_ini_string("session.save_handler", sizeof("session.save_handler") - 1, 0);