Merge branch 'PHP-7.4' into PHP-8.0

This commit is contained in:
Derick Rethans 2021-07-19 15:08:09 +01:00
commit 9d0fb10823
2 changed files with 11 additions and 3 deletions

View File

@ -204,7 +204,7 @@ zend_module_entry date_module_entry = {
PHP_MODULE_GLOBALS(date), /* globals descriptor */
PHP_GINIT(date), /* globals ctor */
NULL, /* globals dtor */
NULL, /* post deactivate */
ZEND_MODULE_POST_ZEND_DEACTIVATE_N(date), /* post deactivate */
STANDARD_MODULE_PROPERTIES_EX
};
/* }}} */
@ -249,11 +249,19 @@ PHP_RSHUTDOWN_FUNCTION(date)
efree(DATEG(timezone));
}
DATEG(timezone) = NULL;
if(DATEG(tzcache)) {
return SUCCESS;
}
/* }}} */
ZEND_MODULE_POST_ZEND_DEACTIVATE_D(date)
{
if (DATEG(tzcache)) {
zend_hash_destroy(DATEG(tzcache));
FREE_HASHTABLE(DATEG(tzcache));
DATEG(tzcache) = NULL;
}
if (DATEG(last_errors)) {
timelib_error_container_dtor(DATEG(last_errors));
DATEG(last_errors) = NULL;
@ -261,7 +269,6 @@ PHP_RSHUTDOWN_FUNCTION(date)
return SUCCESS;
}
/* }}} */
#define DATE_TIMEZONEDB php_date_global_timezone_db ? php_date_global_timezone_db : timelib_builtin_db()

View File

@ -31,6 +31,7 @@ PHP_RSHUTDOWN_FUNCTION(date);
PHP_MINIT_FUNCTION(date);
PHP_MSHUTDOWN_FUNCTION(date);
PHP_MINFO_FUNCTION(date);
ZEND_MODULE_POST_ZEND_DEACTIVATE_D(date);
typedef struct _php_date_obj php_date_obj;
typedef struct _php_timezone_obj php_timezone_obj;