diff options
author | Bob Weinand <bobwei9@hotmail.com> | 2014-04-11 18:21:46 +0200 |
---|---|---|
committer | Bob Weinand <bobwei9@hotmail.com> | 2014-04-11 18:21:46 +0200 |
commit | ee2a7c7d41ec98c7529b46583f49e0936cac8774 (patch) | |
tree | 9f7cc94cac8354597b4143f234635ee59e6bc58c /Zend/zend_execute.c | |
parent | ad05d3898eae472532620ce9623c9d39c23ef16a (diff) | |
download | php-git-ee2a7c7d41ec98c7529b46583f49e0936cac8774.tar.gz |
Fixed disallowal of array usage in constants at run-time
Added at the same time the possibility of array dereferencing
to complete the set of features (useful application of arrays in constants)
Diffstat (limited to 'Zend/zend_execute.c')
-rw-r--r-- | Zend/zend_execute.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index 66accd61e9..bdf8b6e70f 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -1352,9 +1352,15 @@ static void zend_fetch_dimension_address_read(temp_variable *result, zval *conta } } +ZEND_API void zend_fetch_dimension_by_zval(zval **result, zval *container, zval *dim TSRMLS_DC) { + temp_variable tmp; + zend_fetch_dimension_address_read(&tmp, container, dim, IS_TMP_VAR, BP_VAR_R TSRMLS_CC); + *result = tmp.var.ptr; +} + static void zend_fetch_property_address(temp_variable *result, zval **container_ptr, zval *prop_ptr, const zend_literal *key, int type TSRMLS_DC) { - zval *container = *container_ptr;; + zval *container = *container_ptr; if (Z_TYPE_P(container) != IS_OBJECT) { if (container == &EG(error_zval)) { |