Skip to content

Commit 5dee60f

Browse files
committed
fix zts core dump .
1 parent 5dad3af commit 5dee60f

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

hashids.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,7 @@ static const zend_function_entry hashids_methods[] = {
339339
PHP_FE_END
340340
};
341341

342+
/* GINIT */
342343
PHP_GINIT_FUNCTION(hashids) {
343344
hashids_globals->salt = NULL;
344345
hashids_globals->min_hash_length = 0;
@@ -360,6 +361,8 @@ PHP_MINIT_FUNCTION(hashids)
360361

361362
PHP_MSHUTDOWN_FUNCTION(hashids)
362363
{
364+
UNREGISTER_INI_ENTRIES();
365+
363366
//free
364367
hashids_free(hashids_entry);
365368
return SUCCESS;
@@ -949,7 +952,11 @@ zend_module_entry hashids_module_entry = {
949952
NULL,
950953
PHP_MINFO(hashids),
951954
PHP_HASHIDS_VERSION,
952-
STANDARD_MODULE_PROPERTIES
955+
PHP_MODULE_GLOBALS(hashids),
956+
PHP_GINIT(hashids),
957+
NULL,
958+
NULL,
959+
STANDARD_MODULE_PROPERTIES_EX
953960
};
954961

955962
#ifdef COMPILE_DL_HASHIDS

0 commit comments

Comments
 (0)