summaryrefslogtreecommitdiff
path: root/Zend/zend_compile.c
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/zend_compile.c')
-rw-r--r--Zend/zend_compile.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c
index dfe8595b90..96bea45431 100644
--- a/Zend/zend_compile.c
+++ b/Zend/zend_compile.c
@@ -3997,7 +3997,6 @@ void zend_do_add_static_array_element(znode *result, znode *offset, const znode
ALLOC_ZVAL(element);
*element = expr->u.constant;
if (offset) {
- long l;
switch (offset->u.constant.type & IS_CONSTANT_TYPE_MASK) {
case IS_CONSTANT:
/* Ugly hack to denote that this value has a constant index */
@@ -4020,8 +4019,7 @@ void zend_do_add_static_array_element(znode *result, znode *offset, const znode
zend_hash_index_update(Z_ARRVAL(result->u.constant), Z_LVAL(offset->u.constant), &element, sizeof(zval *), NULL);
break;
case IS_DOUBLE:
- DVAL_TO_LVAL(Z_DVAL(offset->u.constant), l);
- zend_hash_index_update(Z_ARRVAL(result->u.constant), l, &element, sizeof(zval *), NULL);
+ zend_hash_index_update(Z_ARRVAL(result->u.constant), zend_dval_to_lval(Z_DVAL(offset->u.constant)), &element, sizeof(zval *), NULL);
break;
case IS_CONSTANT_ARRAY:
zend_error(E_ERROR, "Illegal offset type");