kalle Wed Jul 1 17:38:04 2009 UTC
Added files: (Branch: PHP_5_3)
/php-src/ext/reflection/tests bug48757.phpt
Modified files:
/php-src/ext/reflection php_reflection.c
Log:
MFH: Fixed bug #48757 (ReflectionFunction::invoke() parameter issues)
http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/php_reflection.c?r1=1.164.2.33.2.45.2.58&r2=1.164.2.33.2.45.2.59&diff_format=u
Index: php-src/ext/reflection/php_reflection.c
diff -u php-src/ext/reflection/php_reflection.c:1.164.2.33.2.45.2.58
php-src/ext/reflection/php_reflection.c:1.164.2.33.2.45.2.59
--- php-src/ext/reflection/php_reflection.c:1.164.2.33.2.45.2.58 Tue Jun
16 14:33:33 2009
+++ php-src/ext/reflection/php_reflection.c Wed Jul 1 17:38:03 2009
@@ -20,7 +20,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_reflection.c,v 1.164.2.33.2.45.2.58 2009/06/16 14:33:33 felipe Exp
$ */
+/* $Id: php_reflection.c,v 1.164.2.33.2.45.2.59 2009/07/01 17:38:03 kalle Exp
$ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -1717,7 +1717,7 @@
}
/* }}} */
-/* {{{ proto public mixed ReflectionFunction::invoke(mixed* args)
+/* {{{ proto public mixed ReflectionFunction::invoke([mixed* args])
Invokes the function */
ZEND_METHOD(reflection_function, invoke)
{
@@ -1732,7 +1732,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;
}
@@ -5008,7 +5008,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()
@@ -5442,7 +5442,7 @@
php_info_print_table_start();
php_info_print_table_header(2, "Reflection", "enabled");
- php_info_print_table_row(2, "Version", "$Revision: 1.164.2.33.2.45.2.58
$");
+ php_info_print_table_row(2, "Version", "$Revision: 1.164.2.33.2.45.2.59
$");
php_info_print_table_end();
} /* }}} */
@@ -5456,7 +5456,7 @@
NULL,
NULL,
PHP_MINFO(reflection),
- "$Revision: 1.164.2.33.2.45.2.58 $",
+ "$Revision: 1.164.2.33.2.45.2.59 $",
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