From: Marcus Boerger Date: Mon, 27 Dec 2004 13:33:04 +0000 (+0000) Subject: - MFH: More proto/error message fixes X-Git-Tag: php-5.0.4RC1~428 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6a8ee8174e393183047a1c951b57582807f7e264;p=php - MFH: More proto/error message fixes --- diff --git a/Zend/zend_reflection_api.c b/Zend/zend_reflection_api.c index a142ba7e2e..ddc5fd1684 100644 --- a/Zend/zend_reflection_api.c +++ b/Zend/zend_reflection_api.c @@ -1843,7 +1843,7 @@ ZEND_METHOD(reflection_method, __toString) /* }}} */ /* {{{ proto public mixed ReflectionMethod::invoke(mixed object, mixed* args) - Invokes the function. Pass a */ + Invokes the method. */ ZEND_METHOD(reflection_method, invoke) { zval *retval_ptr; @@ -1860,7 +1860,7 @@ ZEND_METHOD(reflection_method, invoke) METHOD_NOTSTATIC; if (argc < 1) { - zend_error(E_WARNING, "%s expects at least one parameter, none given", get_active_function_name(TSRMLS_C)); + zend_error(E_WARNING, "Invoke() expects at least one parameter, none given"); RETURN_FALSE; } @@ -1870,11 +1870,11 @@ ZEND_METHOD(reflection_method, invoke) (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); diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c index a142ba7e2e..ddc5fd1684 100644 --- a/ext/reflection/php_reflection.c +++ b/ext/reflection/php_reflection.c @@ -1843,7 +1843,7 @@ ZEND_METHOD(reflection_method, __toString) /* }}} */ /* {{{ proto public mixed ReflectionMethod::invoke(mixed object, mixed* args) - Invokes the function. Pass a */ + Invokes the method. */ ZEND_METHOD(reflection_method, invoke) { zval *retval_ptr; @@ -1860,7 +1860,7 @@ ZEND_METHOD(reflection_method, invoke) METHOD_NOTSTATIC; if (argc < 1) { - zend_error(E_WARNING, "%s expects at least one parameter, none given", get_active_function_name(TSRMLS_C)); + zend_error(E_WARNING, "Invoke() expects at least one parameter, none given"); RETURN_FALSE; } @@ -1870,11 +1870,11 @@ ZEND_METHOD(reflection_method, invoke) (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);