From f76e17331ef443a9e53eca2e1d3e62a9037e08f4 Mon Sep 17 00:00:00 2001 From: Matt Wilmas Date: Fri, 9 May 2008 09:22:21 +0000 Subject: [PATCH] Fixed bug #44681 (Resources used as array keys get converted to 0) --- Zend/zend_execute.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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); -- 2.50.1