From: Xinchen Hui Date: Mon, 3 Mar 2014 09:44:21 +0000 (+0800) Subject: Elements in array could be reference X-Git-Tag: POST_PHPNG_MERGE~412^2~436^2~8 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ca146a6e14608f6fb6854cd2b4788a59eb40fc4b;p=php Elements in array could be reference --- diff --git a/Zend/zend_API.c b/Zend/zend_API.c index 2d7c8fdc08..f699380bca 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -3165,7 +3165,13 @@ ZEND_API zend_bool zend_is_callable_ex(zval *callable, zval *object_ptr, uint ch if (zend_hash_num_elements(Z_ARRVAL_P(callable)) == 2) { obj = zend_hash_index_find(Z_ARRVAL_P(callable), 0); + if (UNEXPECTED(Z_ISREF_P(obj))) { + obj = Z_REFVAL_P(obj); + } method = zend_hash_index_find(Z_ARRVAL_P(callable), 1); + if (UNEXPECTED(Z_ISREF_P(method))) { + method = Z_REFVAL_P(method); + } } if (obj && method && (Z_TYPE_P(obj) == IS_OBJECT ||