File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -204,7 +204,7 @@ zend_module_entry date_module_entry = {
204
204
PHP_MODULE_GLOBALS (date ), /* globals descriptor */
205
205
PHP_GINIT (date ), /* globals ctor */
206
206
NULL , /* globals dtor */
207
- NULL , /* post deactivate */
207
+ ZEND_MODULE_POST_ZEND_DEACTIVATE_N ( date ), /* post deactivate */
208
208
STANDARD_MODULE_PROPERTIES_EX
209
209
};
210
210
/* }}} */
@@ -249,19 +249,26 @@ PHP_RSHUTDOWN_FUNCTION(date)
249
249
efree (DATEG (timezone ));
250
250
}
251
251
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 )) {
253
260
zend_hash_destroy (DATEG (tzcache ));
254
261
FREE_HASHTABLE (DATEG (tzcache ));
255
262
DATEG (tzcache ) = NULL ;
256
263
}
264
+
257
265
if (DATEG (last_errors )) {
258
266
timelib_error_container_dtor (DATEG (last_errors ));
259
267
DATEG (last_errors ) = NULL ;
260
268
}
261
269
262
270
return SUCCESS ;
263
271
}
264
- /* }}} */
265
272
266
273
#define DATE_TIMEZONEDB php_date_global_timezone_db ? php_date_global_timezone_db : timelib_builtin_db()
267
274
Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ PHP_RSHUTDOWN_FUNCTION(date);
31
31
PHP_MINIT_FUNCTION (date );
32
32
PHP_MSHUTDOWN_FUNCTION (date );
33
33
PHP_MINFO_FUNCTION (date );
34
+ ZEND_MODULE_POST_ZEND_DEACTIVATE_D (date );
34
35
35
36
typedef struct _php_date_obj php_date_obj ;
36
37
typedef struct _php_timezone_obj php_timezone_obj ;
You can’t perform that action at this time.
0 commit comments