com php-src: Elements in array could be reference: Zend/zend_ API.c

From: Date: Mon, 03 Mar 2014 09:44:21 +0000
Subject: com php-src: Elements in array could be reference: Zend/zend_ API.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-77846@lists.php.net to get a copy of this message
Commit: ca146a6e14608f6fb6854cd2b4788a59eb40fc4b Author: Xinchen Hui <laruence@gmail.com> Mon, 3 Mar 2014 17:44:21 +0800 Parents: 5de87fe680fdb1c954c6762077f5cddbc1a8b792 Branches: phpng Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=ca146a6e14608f6fb6854cd2b4788a59eb40fc4b Log: Elements in array could be reference Changed paths: M Zend/zend_API.c Diff: diff --git a/Zend/zend_API.c b/Zend/zend_API.c index 2d7c8fd..f699380 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 ||

« previous php.cvs (#77846) next »