From 9b14b5d1900c14471a8b42beaeec8575ba91aced Mon Sep 17 00:00:00 2001 From: Gabriel Caruso Date: Sun, 12 Aug 2018 23:15:42 -0300 Subject: [PATCH] Fix arginfos of required arguments for some Reflection methods --- ext/reflection/php_reflection.c | 8 ++++---- ext/reflection/tests/ReflectionClass_toString_001.phpt | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c index 690aaa0fe6232..786166be1d54b 100644 --- a/ext/reflection/php_reflection.c +++ b/ext/reflection/php_reflection.c @@ -3363,7 +3363,7 @@ static void reflection_method_invoke(INTERNAL_FUNCTION_PARAMETERS, int variadic) } /* }}} */ -/* {{{ proto public mixed ReflectionMethod::invoke(mixed object, mixed* args) +/* {{{ proto public mixed ReflectionMethod::invoke(mixed object, [mixed* args]) Invokes the method. */ ZEND_METHOD(reflection_method, invoke) { @@ -4834,7 +4834,7 @@ ZEND_METHOD(reflection_class, isInstance) } /* }}} */ -/* {{{ proto public stdclass ReflectionClass::newInstance(mixed* args, ...) +/* {{{ proto public stdclass ReflectionClass::newInstance([mixed* args], ...) Returns an instance of this class */ ZEND_METHOD(reflection_class, newInstance) { @@ -6439,7 +6439,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_reflection_method___construct, 0, 0, 1) ZEND_ARG_INFO(0, name) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO(arginfo_reflection_method_invoke, 0) +ZEND_BEGIN_ARG_INFO_EX(arginfo_reflection_method_invoke, 0, 0, 1) ZEND_ARG_INFO(0, object) ZEND_ARG_INFO(0, args) ZEND_END_ARG_INFO() @@ -6535,7 +6535,7 @@ ZEND_BEGIN_ARG_INFO(arginfo_reflection_class_isInstance, 0) ZEND_ARG_INFO(0, object) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO(arginfo_reflection_class_newInstance, 0) +ZEND_BEGIN_ARG_INFO_EX(arginfo_reflection_class_newInstance, 0, 0, 0) ZEND_ARG_INFO(0, args) ZEND_END_ARG_INFO() diff --git a/ext/reflection/tests/ReflectionClass_toString_001.phpt b/ext/reflection/tests/ReflectionClass_toString_001.phpt index 29d58420e375c..994ce80b28d5d 100644 --- a/ext/reflection/tests/ReflectionClass_toString_001.phpt +++ b/ext/reflection/tests/ReflectionClass_toString_001.phpt @@ -265,7 +265,7 @@ Class [ class ReflectionClass implements Reflector ] { Method [ public method newInstance ] { - Parameters [1] { - Parameter #0 [ $args ] + Parameter #0 [ $args ] } }