]> granicus.if.org Git - php/commitdiff
Make invokeArgs() error messages consistent with invoke().
authorSebastian Bergmann <sebastian@php.net>
Thu, 3 Sep 2009 14:02:51 +0000 (14:02 +0000)
committerSebastian Bergmann <sebastian@php.net>
Thu, 3 Sep 2009 14:02:51 +0000 (14:02 +0000)
ext/reflection/php_reflection.c
ext/reflection/tests/ReflectionMethod_invokeArgs_error3.phpt

index 6374eaa3a15521e3014556ae4d8ee3f353e24deb..ba165dbd1e170ecfec73150a487512786c79881a 100644 (file)
@@ -2422,11 +2422,11 @@ ZEND_METHOD(reflection_method, invokeArgs)
                (mptr->common.fn_flags & ZEND_ACC_ABSTRACT)) {
                if (mptr->common.fn_flags & ZEND_ACC_ABSTRACT) {
                        zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, 
-                               "Trying to invoke abstract method %s::%s", 
+                               "Trying to invoke abstract method %s::%s()", 
                                mptr->common.scope->name, mptr->common.function_name);
                } else {
                        zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC,
-                               "Trying to invoke %s method %s::%s from scope %s", 
+                               "Trying to invoke %s method %s::%s() from scope %s", 
                                mptr->common.fn_flags & ZEND_ACC_PROTECTED ? "protected" : "private",
                                mptr->common.scope->name, mptr->common.function_name,
                                Z_OBJCE_P(getThis())->name);
@@ -2453,7 +2453,7 @@ ZEND_METHOD(reflection_method, invokeArgs)
                if (!object) {
                        efree(params);
                        zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC,
-                               "Trying to invoke non static method %s::%s without an object", 
+                               "Trying to invoke non static method %s::%s() without an object", 
                                mptr->common.scope->name, mptr->common.function_name);
                        return;
                }
index 834f35d668d920290e1be2d9d9dfc84a82a0defa..f39dd4681916ef979300337e306ffbbcd6c7dec8 100644 (file)
@@ -111,9 +111,9 @@ NULL
 NULL
 
 Private method:
-string(84) "Trying to invoke private method TestClass::privateMethod from scope ReflectionMethod"
+string(86) "Trying to invoke private method TestClass::privateMethod() from scope ReflectionMethod"
 
 Abstract method:
-string(51) "Trying to invoke abstract method AbstractClass::foo"
+string(53) "Trying to invoke abstract method AbstractClass::foo()"
 
 Warning: ReflectionMethod::invokeArgs() expects exactly 2 parameters, 1 given in %s on line %d