dmitry Tue Oct 3 09:59:24 2006 UTC Modified files: /php-src/ext/reflection php_reflection.c Log: Fixed bug #38942 (Double old-style-ctor inheritance) http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/php_reflection.c?r1=1.257&r2=1.258&diff_format=u Index: php-src/ext/reflection/php_reflection.c diff -u php-src/ext/reflection/php_reflection.c:1.257 php-src/ext/reflection/php_reflection.c:1.258 --- php-src/ext/reflection/php_reflection.c:1.257 Mon Oct 2 12:15:47 2006 +++ php-src/ext/reflection/php_reflection.c Tue Oct 3 09:59:24 2006 @@ -20,7 +20,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_reflection.c,v 1.257 2006/10/02 12:15:47 tony2001 Exp $ */ +/* $Id: php_reflection.c,v 1.258 2006/10/03 09:59:24 dmitry Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -502,11 +502,13 @@ /* Non static methods */ if (&ce->function_table) { count = zend_hash_num_elements(&ce->function_table) - count_static_funcs; - string_printf(str, "\n%s - Methods [%d] {", indent, count); if (count > 0) { HashPosition pos; zend_function *mptr; + string dyn; + count = 0; + string_init(&dyn); zend_hash_internal_pointer_reset_ex(&ce->function_table, &pos); while (zend_hash_get_current_data_ex(&ce->function_table, (void **) &mptr, &pos) == SUCCESS) { @@ -524,14 +526,18 @@ (zend_u_binary_strcasecmp(key.u, key_len-1, mptr->common.function_name.u, len) == 0) : (zend_binary_strcasecmp(key.s, key_len-1, mptr->common.function_name.s, len) == 0))) { - string_printf(str, "\n"); - _function_string(str, mptr, ce, sub_indent.string TSRMLS_CC); + string_printf(&dyn, "\n"); + _function_string(&dyn, mptr, ce, sub_indent.string TSRMLS_CC); + count++; } } zend_hash_move_forward_ex(&ce->function_table, &pos); } + string_printf(str, "\n%s - Methods [%d] {", indent, count); + string_append(str, &dyn); + string_free(&dyn); } else { - string_printf(str, "\n"); + string_printf(str, "\n%s - Methods [0] {\n", indent); } string_printf(str, "%s }\n", indent); } @@ -4903,7 +4909,7 @@ php_info_print_table_start(); php_info_print_table_header(2, "Reflection", "enabled"); - php_info_print_table_row(2, "Version", "$Id: php_reflection.c,v 1.257 2006/10/02 12:15:47 tony2001 Exp $"); + php_info_print_table_row(2, "Version", "$Id: php_reflection.c,v 1.258 2006/10/03 09:59:24 dmitry Exp $"); php_info_print_table_end(); } /* }}} */
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php