Fixed bug #44681 (Resources used as array keys get converted to 0)

This commit is contained in:
Matt Wilmas 2008-05-09 09:22:21 +00:00
parent b6c0148fc0
commit f76e17331e

View File

@ -934,13 +934,13 @@ fetch_string_dim:
efree(offset_key.v); efree(offset_key.v);
} }
break; 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: case IS_DOUBLE:
index = (long)Z_DVAL_P(dim); index = (long)Z_DVAL_P(dim);
goto num_index; 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_BOOL:
case IS_LONG: case IS_LONG:
index = Z_LVAL_P(dim); index = Z_LVAL_P(dim);