diff options
author | Xinchen Hui <laruence@php.net> | 2015-03-03 17:34:45 +0800 |
---|---|---|
committer | Xinchen Hui <laruence@php.net> | 2015-03-03 18:11:56 +0800 |
commit | 7ad6711a4dcb092e2125d36ec623f38a22153e73 (patch) | |
tree | 2b75d67091dbdb74a16d429e3500bcd4cb0cb9da /Zend/zend_API.c | |
parent | 70bd500645da48f3c2eb2ebbe916a2abe51a48e0 (diff) | |
download | php-git-7ad6711a4dcb092e2125d36ec623f38a22153e73.tar.gz |
Fixed bug #69167 (call_user_func does not support references anymore)
Diffstat (limited to 'Zend/zend_API.c')
-rw-r--r-- | Zend/zend_API.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/Zend/zend_API.c b/Zend/zend_API.c index 693a8340f8..88687796cc 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -3017,6 +3017,7 @@ ZEND_API zend_bool zend_is_callable_ex(zval *callable, zend_object *object, uint return 0; } +again: switch (Z_TYPE_P(callable)) { case IS_STRING: if (object) { @@ -3160,7 +3161,6 @@ ZEND_API zend_bool zend_is_callable_ex(zval *callable, zend_object *object, uint } } return 0; - case IS_OBJECT: if (Z_OBJ_HANDLER_P(callable, get_closure) && Z_OBJ_HANDLER_P(callable, get_closure)(callable, &fcc->calling_scope, &fcc->function_handler, &fcc->object) == SUCCESS) { fcc->called_scope = fcc->calling_scope; @@ -3174,7 +3174,14 @@ ZEND_API zend_bool zend_is_callable_ex(zval *callable, zend_object *object, uint return 1; } /* break missing intentionally */ - + if (callable_name) { + *callable_name = zval_get_string(callable); + } + if (error) zend_spprintf(error, 0, "no array or string given"); + return 0; + case IS_REFERENCE: + callable = Z_REFVAL_P(callable); + goto again; default: if (callable_name) { *callable_name = zval_get_string(callable); |