tony2001 Wed May 24 21:22:13 2006 UTC
Modified files: (Branch: PHP_5_2)
/php-src/ext/tidy php_tidy.h tidy.c
Log:
fix #37418 (tidy module crashes CLI version of PHP)
http://cvs.php.net/viewcvs.cgi/php-src/ext/tidy/php_tidy.h?r1=1.26.2.1&r2=1.26.2.1.2.1&diff_format=u
Index: php-src/ext/tidy/php_tidy.h
diff -u php-src/ext/tidy/php_tidy.h:1.26.2.1
php-src/ext/tidy/php_tidy.h:1.26.2.1.2.1
--- php-src/ext/tidy/php_tidy.h:1.26.2.1 Sun Jan 1 12:50:16 2006
+++ php-src/ext/tidy/php_tidy.h Wed May 24 21:22:13 2006
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_tidy.h,v 1.26.2.1 2006/01/01 12:50:16 sniper Exp $ */
+/* $Id: php_tidy.h,v 1.26.2.1.2.1 2006/05/24 21:22:13 tony2001 Exp $ */
#ifndef PHP_TIDY_H
#define PHP_TIDY_H
@@ -40,6 +40,7 @@
#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);
http://cvs.php.net/viewcvs.cgi/php-src/ext/tidy/tidy.c?r1=1.66.2.8.2.1&r2=1.66.2.8.2.2&diff_format=u
Index: php-src/ext/tidy/tidy.c
diff -u php-src/ext/tidy/tidy.c:1.66.2.8.2.1
php-src/ext/tidy/tidy.c:1.66.2.8.2.2
--- php-src/ext/tidy/tidy.c:1.66.2.8.2.1 Tue May 9 23:58:46 2006
+++ php-src/ext/tidy/tidy.c Wed May 24 21:22:13 2006
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: tidy.c,v 1.66.2.8.2.1 2006/05/09 23:58:46 helly Exp $ */
+/* $Id: tidy.c,v 1.66.2.8.2.2 2006/05/24 21:22:13 tony2001 Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -326,7 +326,7 @@
"tidy",
tidy_functions,
PHP_MINIT(tidy),
- NULL,
+ PHP_MSHUTDOWN(tidy),
PHP_RINIT(tidy),
NULL,
PHP_MINFO(tidy),
@@ -1000,12 +1000,23 @@
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();
php_info_print_table_header(2, "Tidy support", "enabled");
php_info_print_table_row(2, "libTidy Release", (char
*)tidyReleaseDate());
- php_info_print_table_row(2, "Extension Version",
PHP_TIDY_MODULE_VERSION " ($Id: tidy.c,v 1.66.2.8.2.1 2006/05/09 23:58:46 helly
Exp $)");
+ php_info_print_table_row(2, "Extension Version",
PHP_TIDY_MODULE_VERSION " ($Id: tidy.c,v 1.66.2.8.2.2 2006/05/24 21:22:13
tony2001 Exp $)");
php_info_print_table_end();
DISPLAY_INI_ENTRIES();
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php