kalle Wed Jul 1 17:37:42 2009 UTC Added files: /php-src/ext/reflection/tests bug48757.phpt
Modified files: /php-src/ext/reflection php_reflection.c Log: Fixed bug #48757 (ReflectionFunction::invoke() parameter issues) http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/php_reflection.c?r1=1.346&r2=1.347&diff_format=u Index: php-src/ext/reflection/php_reflection.c diff -u php-src/ext/reflection/php_reflection.c:1.346 php-src/ext/reflection/php_reflection.c:1.347 --- php-src/ext/reflection/php_reflection.c:1.346 Tue Jun 16 14:29:18 2009 +++ php-src/ext/reflection/php_reflection.c Wed Jul 1 17:37:42 2009 @@ -20,7 +20,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_reflection.c,v 1.346 2009/06/16 14:29:18 felipe Exp $ */ +/* $Id: php_reflection.c,v 1.347 2009/07/01 17:37:42 kalle Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -1763,7 +1763,7 @@ } /* }}} */ -/* {{{ proto public mixed ReflectionFunction::invoke(mixed* args) U +/* {{{ proto public mixed ReflectionFunction::invoke([mixed* args]) U Invokes the function */ ZEND_METHOD(reflection_function, invoke) { @@ -1778,7 +1778,7 @@ METHOD_NOTSTATIC(reflection_function_ptr); GET_REFLECTION_OBJECT_PTR(fptr); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "+", ¶ms, &num_args) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "*", ¶ms, &num_args) == FAILURE) { return; } @@ -5249,7 +5249,7 @@ ZEND_ARG_INFO(0, name) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO(arginfo_reflection_function_invoke, 0) +ZEND_BEGIN_ARG_INFO_EX(arginfo_reflection_function_invoke, 0, 0, 0) ZEND_ARG_INFO(0, args) ZEND_END_ARG_INFO() @@ -5687,7 +5687,7 @@ php_info_print_table_start(); php_info_print_table_header(2, "Reflection", "enabled"); - php_info_print_table_row(2, "Version", "$Revision: 1.346 $"); + php_info_print_table_row(2, "Version", "$Revision: 1.347 $"); php_info_print_table_end(); } /* }}} */ @@ -5701,7 +5701,7 @@ NULL, NULL, PHP_MINFO(reflection), - "$Revision: 1.346 $", + "$Revision: 1.347 $", STANDARD_MODULE_PROPERTIES }; /* }}} */ http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/tests/bug48757.phpt?view=markup&rev=1.1 Index: php-src/ext/reflection/tests/bug48757.phpt +++ php-src/ext/reflection/tests/bug48757.phpt --TEST-- Bug #48757 (ReflectionFunction::invoke() parameter issues) --FILE-- <?php function test() { echo "Hello World\n"; } function another_test($parameter) { var_dump($parameter); } $func = new ReflectionFunction('test'); $func->invoke(); $func = new ReflectionFunction('another_test'); $func->invoke('testing'); ?> --EXPECT-- Hello World unicode(7) "testing" -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php