summaryrefslogtreecommitdiff
path: root/Zend/zend_object_handlers.c
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/zend_object_handlers.c')
-rw-r--r--Zend/zend_object_handlers.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/Zend/zend_object_handlers.c b/Zend/zend_object_handlers.c
index ff5764e6b0..b03aad9ac3 100644
--- a/Zend/zend_object_handlers.c
+++ b/Zend/zend_object_handlers.c
@@ -396,7 +396,7 @@ static union _zend_function *zend_std_get_method(zval *object, char *method_name
zobj = Z_OBJ_P(object);
if (zend_hash_find(&zobj->ce->function_table, lc_method_name, method_len+1, (void **)&func_method) == FAILURE) {
- if (zobj->ce->__call != NULL) {
+ if (zobj->ce->__call) {
zend_internal_function *call_user_call = emalloc(sizeof(zend_internal_function));
call_user_call->type = ZEND_INTERNAL_FUNCTION;
call_user_call->handler = zend_std_call_user_call;
@@ -407,8 +407,9 @@ static union _zend_function *zend_std_get_method(zval *object, char *method_name
free_alloca(lc_method_name);
return (union _zend_function *)call_user_call;
+ } else {
+ return NULL;
}
- zend_error(E_ERROR, "Call to undefined function %s()", method_name);
}
free_alloca(lc_method_name);