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 = {
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
Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ PHP_RSHUTDOWN_FUNCTION(date);
3131PHP_MINIT_FUNCTION (date );
3232PHP_MSHUTDOWN_FUNCTION (date );
3333PHP_MINFO_FUNCTION (date );
34+ ZEND_MODULE_POST_ZEND_DEACTIVATE_D (date );
3435
3536typedef struct _php_date_obj php_date_obj ;
3637typedef struct _php_timezone_obj php_timezone_obj ;
You can’t perform that action at this time.
0 commit comments