]> granicus.if.org Git - php/commitdiff
Elements in array could be reference
authorXinchen Hui <laruence@gmail.com>
Mon, 3 Mar 2014 09:44:21 +0000 (17:44 +0800)
committerXinchen Hui <laruence@gmail.com>
Mon, 3 Mar 2014 09:44:21 +0000 (17:44 +0800)
Zend/zend_API.c

index 2d7c8fdc08d9ee37af004a8119112097d0cdcbac..f699380bca5be71960e799249673daa9c1dfbf2b 100644 (file)
@@ -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 ||