diff options
author | Marcus Boerger <helly@php.net> | 2003-09-02 14:08:59 +0000 |
---|---|---|
committer | Marcus Boerger <helly@php.net> | 2003-09-02 14:08:59 +0000 |
commit | 9702c70a3501ad800d25bb73c62e1fb30b6d576f (patch) | |
tree | 5c05966f0e71f9a8aaf5b4b09981cdcaa78944d3 /Zend | |
parent | 3d6426ee14a38bed1ebbccaf75d8eccfd7d08060 (diff) | |
download | php-git-9702c70a3501ad800d25bb73c62e1fb30b6d576f.tar.gz |
Synch/Unify error messages related to function/method calls
Diffstat (limited to 'Zend')
-rw-r--r-- | Zend/zend_execute.c | 6 | ||||
-rw-r--r-- | Zend/zend_object_handlers.c | 4 | ||||
-rw-r--r-- | Zend/zend_objects.c | 4 |
3 files changed, 7 insertions, 7 deletions
diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index ae957a726a..de31c1c89c 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -2475,7 +2475,7 @@ int zend_init_fcall_by_name_handler(ZEND_OPCODE_HANDLER_ARGS) } if (zend_hash_find(EG(function_table), function_name_strval, function_name_strlen+1, (void **) &function)==FAILURE) { - zend_error(E_ERROR, "Call to undefined function: %s()", function_name_strval); + zend_error(E_ERROR, "Call to undefined function %s()", function_name_strval); } if (!is_const) { @@ -3122,13 +3122,13 @@ int zend_clone_handler(ZEND_OPCODE_HANDLER_ARGS) /* Ensure that if we're calling a private function, we're allowed to do so. */ if (ce != EG(scope)) { - zend_error(E_ERROR, "Call to private __clone from context '%s'", EG(scope) ? EG(scope)->name : ""); + zend_error(E_ERROR, "Call to private %s::__clone() from context '%s'", ce->name, EG(scope) ? EG(scope)->name : ""); } } else if ((clone->common.fn_flags & ZEND_ACC_PROTECTED)) { /* Ensure that if we're calling a protected function, we're allowed to do so. */ if (!zend_check_protected(clone->common.scope, EG(scope))) { - zend_error(E_ERROR, "Call to protected __clone from context '%s'", EG(scope) ? EG(scope)->name : ""); + zend_error(E_ERROR, "Call to protected %s::__clone() from context '%s'", ce->name, EG(scope) ? EG(scope)->name : ""); } } } diff --git a/Zend/zend_object_handlers.c b/Zend/zend_object_handlers.c index 25d10aaf54..a5914cbad9 100644 --- a/Zend/zend_object_handlers.c +++ b/Zend/zend_object_handlers.c @@ -765,13 +765,13 @@ static union _zend_function *zend_std_get_constructor(zval *object TSRMLS_DC) /* Ensure that if we're calling a private function, we're allowed to do so. */ if (object->value.obj.handlers->get_class_entry(object TSRMLS_CC) != EG(scope)) { - zend_error(E_ERROR, "Call to private constructor from context '%s'", EG(scope) ? EG(scope)->name : ""); + zend_error(E_ERROR, "Call to private %s::%s() from context '%s'", constructor->common.scope->name, constructor->common.function_name, EG(scope) ? EG(scope)->name : ""); } } else if ((constructor->common.fn_flags & ZEND_ACC_PROTECTED)) { /* Ensure that if we're calling a protected function, we're allowed to do so. */ if (!zend_check_protected(constructor->common.scope, EG(scope))) { - zend_error(E_ERROR, "Call to protected constructor from context '%s'", EG(scope) ? EG(scope)->name : ""); + zend_error(E_ERROR, "Call to protected %s::%s() from context '%s'", constructor->common.scope->name, constructor->common.function_name, EG(scope) ? EG(scope)->name : ""); } } } diff --git a/Zend/zend_objects.c b/Zend/zend_objects.c index 114d069dd0..67e943428a 100644 --- a/Zend/zend_objects.c +++ b/Zend/zend_objects.c @@ -50,7 +50,7 @@ ZEND_API void zend_objects_destroy_object(zend_object *object, zend_object_handl zend_nuke_object(object TSRMLS_CC); /* unfortunately we *must* destroy it now anyway */ zend_error(EG(in_execution) ? E_ERROR : E_WARNING, - "Call to private %s::__destruct from context '%s'%s", + "Call to private %s::__destruct() from context '%s'%s", ce->name, EG(scope) ? EG(scope)->name : "", EG(in_execution) ? "" : " during shutdown ignored"); @@ -64,7 +64,7 @@ ZEND_API void zend_objects_destroy_object(zend_object *object, zend_object_handl zend_nuke_object(object TSRMLS_CC); /* unfortunately we *must* destroy it now anyway */ zend_error(EG(in_execution) ? E_ERROR : E_WARNING, - "Call to protected %s::__destruct from context '%s'%s", + "Call to protected %s::__destruct() from context '%s'%s", ce->name, EG(scope) ? EG(scope)->name : "", EG(in_execution) ? "" : " during shutdown ignored"); |