Skip to content

Commit a1cd11a

Browse files
ReflectionMethod::getPrototype(): add parentheses to error message
1 parent bd8a3ee commit a1cd11a

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

ext/reflection/php_reflection.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3728,7 +3728,7 @@ ZEND_METHOD(ReflectionMethod, getPrototype)
37283728

37293729
if (!mptr->common.prototype) {
37303730
zend_throw_exception_ex(reflection_exception_ptr, 0,
3731-
"Method %s::%s does not have a prototype", ZSTR_VAL(intern->ce->name), ZSTR_VAL(mptr->common.function_name));
3731+
"Method %s::%s() does not have a prototype", ZSTR_VAL(intern->ce->name), ZSTR_VAL(mptr->common.function_name));
37323732
RETURN_THROWS();
37333733
}
37343734

ext/reflection/tests/bug74949.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ try {
2121
Method [ <internal> public method __invoke ] {
2222
}
2323

24-
Method Closure::__invoke does not have a prototype
24+
Method Closure::__invoke() does not have a prototype

0 commit comments

Comments
 (0)