diff --git a/NEWS b/NEWS index c695f56584c9..1fa8e6f77041 100644 --- a/NEWS +++ b/NEWS @@ -27,6 +27,8 @@ PHP NEWS - Date: . Fixed bug GH-20503 (Assertion failure with ext/date DateInterval property hash construction). (heathdutton) + . Fixed bug GH-24350 (MINIT reads a stale external tz database after an + in-process module restart). (Lazizbek Ergashev) - DOM: . Fixed bug GH-23352 (UAF reading an attribute value node retained across diff --git a/ext/date/php_date.c b/ext/date/php_date.c index c455b226c34e..ab03c7b63557 100644 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c @@ -446,12 +446,13 @@ ZEND_MODULE_POST_ZEND_DEACTIVATE_D(date) /* {{{ PHP_MINIT_FUNCTION */ PHP_MINIT_FUNCTION(date) { + php_date_global_timezone_db = NULL; + php_date_global_timezone_db_enabled = 0; + REGISTER_INI_ENTRIES(); date_register_classes(); register_php_date_symbols(module_number); - php_date_global_timezone_db = NULL; - php_date_global_timezone_db_enabled = 0; DATEG(last_errors) = NULL; return SUCCESS; }