summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/date/php_date.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/ext/date/php_date.c b/ext/date/php_date.c
index fe3a7a5b02..52df63314e 100644
--- a/ext/date/php_date.c
+++ b/ext/date/php_date.c
@@ -619,6 +619,7 @@ PHP_RINIT_FUNCTION(date)
}
DATEG(timezone) = NULL;
DATEG(tzcache) = NULL;
+ DATEG(last_errors) = NULL;
return SUCCESS;
}
@@ -636,6 +637,11 @@ PHP_RSHUTDOWN_FUNCTION(date)
FREE_HASHTABLE(DATEG(tzcache));
DATEG(tzcache) = NULL;
}
+ if (DATEG(last_errors)) {
+ timelib_error_container_dtor(DATEG(last_errors));
+ DATEG(last_errors) = NULL;
+ }
+
return SUCCESS;
}
/* }}} */
@@ -777,7 +783,6 @@ PHP_MINIT_FUNCTION(date)
php_date_global_timezone_db = NULL;
php_date_global_timezone_db_enabled = 0;
-
DATEG(last_errors) = NULL;
return SUCCESS;
}