From: Matt Wilmas Date: Fri, 9 May 2008 09:22:21 +0000 (+0000) Subject: Fixed bug #44681 (Resources used as array keys get converted to 0) X-Git-Tag: RELEASE_2_0_0b1~45 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f76e17331ef443a9e53eca2e1d3e62a9037e08f4;p=php Fixed bug #44681 (Resources used as array keys get converted to 0) --- diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index 5ceaec8cd0..1d6a766a96 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -934,13 +934,13 @@ fetch_string_dim: efree(offset_key.v); } break; - case IS_RESOURCE: - zend_error(E_STRICT, "Resource ID#%ld used as offset, casting to integer (%ld)", Z_LVAL_P(dim), Z_LVAL_P(dim)); - /* Fall Through */ case IS_DOUBLE: index = (long)Z_DVAL_P(dim); goto num_index; + case IS_RESOURCE: + zend_error(E_STRICT, "Resource ID#%ld used as offset, casting to integer (%ld)", Z_LVAL_P(dim), Z_LVAL_P(dim)); + /* Fall Through */ case IS_BOOL: case IS_LONG: index = Z_LVAL_P(dim);