diff options
author | Zeev Suraski <zeev@php.net> | 2000-06-09 15:40:37 +0000 |
---|---|---|
committer | Zeev Suraski <zeev@php.net> | 2000-06-09 15:40:37 +0000 |
commit | fddf89aff725a5d74a2dc564f3d8f43cd84bdb13 (patch) | |
tree | d12f24a3dbdb20a11625d1ebc525259cf61e9a97 | |
parent | d9756780068a2acd0d1ced9a7a93b2a26fd342a4 (diff) | |
download | php-git-fddf89aff725a5d74a2dc564f3d8f43cd84bdb13.tar.gz |
Fixed bug #4819
-rw-r--r-- | Zend/zend_builtin_functions.c | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c index 42e15bfce2..cf41e5e269 100644 --- a/Zend/zend_builtin_functions.c +++ b/Zend/zend_builtin_functions.c @@ -56,6 +56,9 @@ static ZEND_FUNCTION(trigger_error); static ZEND_FUNCTION(set_error_handler); static ZEND_FUNCTION(get_declared_classes); static ZEND_FUNCTION(create_function); +#if ZEND_DEBUG +static ZEND_FUNCTION(zend_test_func); +#endif unsigned char first_arg_force_ref[] = { 1, BYREF_FORCE }; unsigned char first_arg_allow_ref[] = { 1, BYREF_ALLOW }; @@ -95,6 +98,9 @@ static zend_function_entry builtin_functions[] = { ZEND_FE(set_error_handler, NULL) ZEND_FE(get_declared_classes, NULL) ZEND_FE(create_function, NULL) +#if ZEND_DEBUG + ZEND_FE(zend_test_func, NULL) +#endif { NULL, NULL, NULL } }; @@ -780,9 +786,13 @@ ZEND_FUNCTION(set_error_handler) /* }}} */ -static int copy_class_name(zend_class_entry *ce, zval *array) +static int copy_class_name(zend_class_entry *ce, int num_args, va_list args, zend_hash_key *hash_key) { - add_next_index_stringl(array, ce->name, ce->name_length, 1); + zval *array = va_arg(args, zval *); + + if (hash_key->nKeyLength==0 || hash_key->arKey[0]!=0) { + add_next_index_stringl(array, ce->name, ce->name_length, 1); + } return 0; } @@ -797,7 +807,7 @@ ZEND_FUNCTION(get_declared_classes) } array_init(return_value); - zend_hash_apply_with_argument(CG(class_table), (apply_func_arg_t)copy_class_name, return_value); + zend_hash_apply_with_arguments(CG(class_table), copy_class_name, 1, return_value); } /* }}} */ @@ -854,3 +864,12 @@ ZEND_FUNCTION(create_function) } } /* }}} */ + + + +ZEND_FUNCTION(zend_test_func) +{ + zval **arg1, **arg2; + + zend_get_parameters_ex(2, &arg1, &arg2); +} |