diff options
author | Dmitry Stogov <dmitry@php.net> | 2006-10-03 09:59:07 +0000 |
---|---|---|
committer | Dmitry Stogov <dmitry@php.net> | 2006-10-03 09:59:07 +0000 |
commit | 7c78500d9663ba98508f42eef97ae7b596ea9e1a (patch) | |
tree | f9813f212c3916829fb41df920b433d47cdeb91d /ext/reflection/php_reflection.c | |
parent | 9875fe44e21cb98a274e1b8d0938ff1e13888012 (diff) | |
download | php-git-7c78500d9663ba98508f42eef97ae7b596ea9e1a.tar.gz |
Fixed bug #38942 (Double old-style-ctor inheritance)
Diffstat (limited to 'ext/reflection/php_reflection.c')
-rw-r--r-- | ext/reflection/php_reflection.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c index d7d17f7618..a733a6a2f3 100644 --- a/ext/reflection/php_reflection.c +++ b/ext/reflection/php_reflection.c @@ -509,11 +509,13 @@ static void _class_string(string *str, zend_class_entry *ce, zval *obj, char *in /* 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) { @@ -529,14 +531,18 @@ static void _class_string(string *str, zend_class_entry *ce, zval *obj, char *in zend_hash_get_current_key_ex(&ce->function_table, &key, &key_len, &num_index, 0, &pos) != HASH_KEY_IS_STRING || zend_binary_strcasecmp(key, key_len-1, mptr->common.function_name, 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); } |