Skip to content

Commit 8400878

Browse files
committed
Merge branch 'PHP-8.0'
2 parents 814a932 + 9d0fb10 commit 8400878

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

ext/date/php_date.c

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ zend_module_entry date_module_entry = {
204204
PHP_MODULE_GLOBALS(date), /* globals descriptor */
205205
PHP_GINIT(date), /* globals ctor */
206206
NULL, /* globals dtor */
207-
NULL, /* post deactivate */
207+
ZEND_MODULE_POST_ZEND_DEACTIVATE_N(date), /* post deactivate */
208208
STANDARD_MODULE_PROPERTIES_EX
209209
};
210210
/* }}} */
@@ -249,19 +249,26 @@ PHP_RSHUTDOWN_FUNCTION(date)
249249
efree(DATEG(timezone));
250250
}
251251
DATEG(timezone) = NULL;
252-
if(DATEG(tzcache)) {
252+
253+
return SUCCESS;
254+
}
255+
/* }}} */
256+
257+
ZEND_MODULE_POST_ZEND_DEACTIVATE_D(date)
258+
{
259+
if (DATEG(tzcache)) {
253260
zend_hash_destroy(DATEG(tzcache));
254261
FREE_HASHTABLE(DATEG(tzcache));
255262
DATEG(tzcache) = NULL;
256263
}
264+
257265
if (DATEG(last_errors)) {
258266
timelib_error_container_dtor(DATEG(last_errors));
259267
DATEG(last_errors) = NULL;
260268
}
261269

262270
return SUCCESS;
263271
}
264-
/* }}} */
265272

266273
#define DATE_TIMEZONEDB php_date_global_timezone_db ? php_date_global_timezone_db : timelib_builtin_db()
267274

ext/date/php_date.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ PHP_RSHUTDOWN_FUNCTION(date);
3131
PHP_MINIT_FUNCTION(date);
3232
PHP_MSHUTDOWN_FUNCTION(date);
3333
PHP_MINFO_FUNCTION(date);
34+
ZEND_MODULE_POST_ZEND_DEACTIVATE_D(date);
3435

3536
typedef struct _php_date_obj php_date_obj;
3637
typedef struct _php_timezone_obj php_timezone_obj;

0 commit comments

Comments
 (0)