Changes:
Throw E_WARNING "Illegal offset type" when explicitly creating
array elements with objects, arrays, or resorces as indexes.
This matches implicit creation w/ obj/arr indices.
Throw E_WARNING "Resource ID#%ld used as offset, casting to integer (%ld)"
when implicitly creating array with resource as index. (BC)
}
}
break;
- case IS_DOUBLE:
case IS_RESOURCE:
+ zend_error(E_WARNING, "Resource ID#%ld used as offset, casting to integer (%ld)", dim->value.lval, dim->value.lval);
+ /* Fall Through */
+ case IS_DOUBLE:
case IS_BOOL:
case IS_LONG: {
long index;
zend_hash_update(array_ptr->value.ht, "", sizeof(""), &expr_ptr, sizeof(zval *), NULL);
break;
default:
+ zend_error(E_WARNING, "Illegal offset type");
zval_ptr_dtor(&expr_ptr);
/* do nothing */
break;