fix #37418 (tidy module crashes CLI version of PHP)

This commit is contained in:
Antony Dovgal 2006-05-24 21:22:13 +00:00
parent fb32c077a2
commit 4cb3d18276
2 changed files with 13 additions and 1 deletions

View File

@ -40,6 +40,7 @@ extern zend_module_entry tidy_module_entry;
#define TIDY_ATTR_ME(name, param) TIDY_METHOD_MAP(name, tam_ ##name, param)
PHP_MINIT_FUNCTION(tidy);
PHP_MSHUTDOWN_FUNCTION(tidy);
PHP_RINIT_FUNCTION(tidy);
PHP_MINFO_FUNCTION(tidy);

View File

@ -326,7 +326,7 @@ zend_module_entry tidy_module_entry = {
"tidy",
tidy_functions,
PHP_MINIT(tidy),
NULL,
PHP_MSHUTDOWN(tidy),
PHP_RINIT(tidy),
NULL,
PHP_MINFO(tidy),
@ -1000,6 +1000,17 @@ PHP_RINIT_FUNCTION(tidy)
return SUCCESS;
}
PHP_MSHUTDOWN_FUNCTION(tidy)
{
#ifdef ZTS
ts_free_id(tidy_globals_id);
#else
tidy_globals_dtor(&tidy_globals TSRMLS_CC);
#endif
UNREGISTER_INI_ENTRIES();
return SUCCESS;
}
PHP_MINFO_FUNCTION(tidy)
{
php_info_print_table_start();