1
0
mirror of https://github.com/php/php-src.git synced 2026-04-26 01:18:19 +02:00

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
+3 -3
View File
@@ -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);