]> 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 4f82b309a19f1844f292c61092068108414840c5..f7192f723bb5e1f260751a5d52e6e0ea19cc3c26 100644 (file)
@@ -2809,11 +2809,11 @@ ZEND_METHOD(reflection_method, invokeArgs)
        {
                if (mptr->common.fn_flags & ZEND_ACC_ABSTRACT) {
                        zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, 
-                               "Trying to invoke abstract method %v::%v", 
+                               "Trying to invoke abstract method %v::%v()", 
                                mptr->common.scope->name, mptr->common.function_name);
                } else {
                        zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC,
-                               "Trying to invoke %s method %v::%v from scope %v", 
+                               "Trying to invoke %s method %v::%v() from scope %v", 
                                mptr->common.fn_flags & ZEND_ACC_PROTECTED ? "protected" : "private",
                                mptr->common.scope->name, mptr->common.function_name,
                                Z_OBJCE_P(getThis())->name);
@@ -2840,7 +2840,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 %v::%v without an object", 
+                               "Trying to invoke non static method %v::%v() without an object", 
                                mptr->common.scope->name, mptr->common.function_name);
                        return;
                }
index c6738c13e85d46a2193f01c67944a2f3cb353612..c50b20e7389ecf76e89b185ee7ddaef18f56b58d 100644 (file)
@@ -109,9 +109,9 @@ NULL
 NULL
 
 Private method:
-unicode(84) "Trying to invoke private method TestClass::privateMethod from scope ReflectionMethod"
+unicode(86) "Trying to invoke private method TestClass::privateMethod() from scope ReflectionMethod"
 
 Abstract method:
-unicode(51) "Trying to invoke abstract method AbstractClass::foo"
+unicode(53) "Trying to invoke abstract method AbstractClass::foo()"
 
 Warning: ReflectionMethod::invokeArgs() expects exactly 2 parameters, 1 given in %sReflectionMethod_invokeArgs_error3.php on line %d