diff --git a/NEWS b/NEWS index 08aa8f4dfc7..fee7ddb59a1 100644 --- a/NEWS +++ b/NEWS @@ -44,6 +44,10 @@ PHP NEWS . Fixed bug #60948 (mysqlnd FTBFS when -Wformat-security is enabled). (Johannes) +- Session + . Fixed bug #60634 (Segmentation fault when trying to die() in + SessionHandler::write()). (Ilia) + - SOAP . Fixed bug #60887 (SoapClient ignores user_agent option and sends no User-Agent header). (carloschilazo at gmail dot com) diff --git a/ext/session/session.c b/ext/session/session.c index b1224321a6c..7a8199d8106 100644 --- a/ext/session/session.c +++ b/ext/session/session.c @@ -1450,9 +1450,7 @@ static void php_session_flush(TSRMLS_D) /* {{{ */ { if (PS(session_status) == php_session_active) { PS(session_status) = php_session_none; - zend_try { - php_session_save_current_state(TSRMLS_C); - } zend_end_try(); + php_session_save_current_state(TSRMLS_C); } } /* }}} */ @@ -2142,7 +2140,9 @@ static PHP_RSHUTDOWN_FUNCTION(session) /* {{{ */ { int i; - php_session_flush(TSRMLS_C); + zend_try { + php_session_flush(TSRMLS_C); + } zend_end_try(); php_rshutdown_session_globals(TSRMLS_C); /* this should NOT be done in php_rshutdown_session_globals() */