tony2001 Wed Aug 30 22:34:48 2006 UTC
Added files: (Branch: PHP_5_2)
/php-src/ext/tidy/tests 019.phpt
Modified files:
/php-src/ext/tidy tidy.c
Log:
MFH: fix leak, add test
http://cvs.php.net/viewvc.cgi/php-src/ext/tidy/tidy.c?r1=1.66.2.8.2.6&r2=1.66.2.8.2.7&diff_format=u
Index: php-src/ext/tidy/tidy.c
diff -u php-src/ext/tidy/tidy.c:1.66.2.8.2.6
php-src/ext/tidy/tidy.c:1.66.2.8.2.7
--- php-src/ext/tidy/tidy.c:1.66.2.8.2.6 Mon Aug 14 20:08:18 2006
+++ php-src/ext/tidy/tidy.c Wed Aug 30 22:34:48 2006
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: tidy.c,v 1.66.2.8.2.6 2006/08/14 20:08:18 nlopess Exp $ */
+/* $Id: tidy.c,v 1.66.2.8.2.7 2006/08/30 22:34:48 tony2001 Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -89,7 +89,7 @@
if(Z_TYPE_P(_val) == IS_ARRAY) { \
_php_tidy_apply_config_array(_doc, HASH_OF(_val) TSRMLS_CC); \
} else { \
- convert_to_string_ex(&_val); \
+ convert_to_string(_val); \
TIDY_SAFE_MODE_CHECK(Z_STRVAL_P(_val)); \
switch (tidyLoadConfig(_doc, Z_STRVAL_P(_val))) { \
case -1: \
@@ -1044,7 +1044,7 @@
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.6 2006/08/14 20:08:18
nlopess Exp $)");
+ php_info_print_table_row(2, "Extension Version",
PHP_TIDY_MODULE_VERSION " ($Id: tidy.c,v 1.66.2.8.2.7 2006/08/30 22:34:48
tony2001 Exp $)");
php_info_print_table_end();
DISPLAY_INI_ENTRIES();
http://cvs.php.net/viewvc.cgi/php-src/ext/tidy/tests/019.phpt?view=markup&rev=1.1
Index: php-src/ext/tidy/tests/019.phpt
+++ php-src/ext/tidy/tests/019.phpt
--TEST--
Test getParent()
--SKIPIF--
<?php if (!extension_loaded("tidy")) print "skip"; ?>
--FILE--
<?php
$x = tidy_parse_string("<body><div>Content</div></body>");
var_dump($x->body()->child[0]->name);
var_dump($x->body()->child[0]->getParent()->name);
?>
--EXPECT--
string(3) "div"
string(4) "body"
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php