From: Thies C. Arntzen Date: Wed, 6 Oct 1999 15:09:26 +0000 (+0000) Subject: fix for using resources as array indices X-Git-Tag: php-4.0b3_RC2~291 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c6b91f789d0d73db60830a3c4292913bc282b2b7;p=php fix for using resources as array indices --- diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index 9fda4a6485..6133ac6bab 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -535,10 +535,11 @@ static inline zval **zend_fetch_dimension_address_inner(HashTable *ht, znode *op } break; case IS_DOUBLE: + case IS_RESOURCE: case IS_LONG: { long index; - if(dim->type == IS_LONG) { + if (dim->type == IS_LONG || dim->type == IS_RESOURCE) { index = dim->value.lval; } else { index = (long)dim->value.dval;