zend_check_string_offset(dim, BP_VAR_RW EXECUTE_DATA_CC);
zend_wrong_string_offset(EXECUTE_DATA_C);
}
- } else if (EXPECTED(!Z_ISERROR_P(container))) {
+ } else {
zend_use_scalar_as_array();
}
- get_op_data_zval_ptr_r((opline+1)->op1_type, (opline+1)->op1, &free_op_data1);
- FREE_OP(free_op_data1);
+ FREE_OP((opline+1)->op1_type, (opline+1)->op1.var);
}
- static zend_never_inline zend_uchar slow_index_convert(const zval *dim, zend_value *value EXECUTE_DATA_DC)
+ static zend_never_inline zend_uchar slow_index_convert(HashTable *ht, const zval *dim, zend_value *value EXECUTE_DATA_DC)
{
switch (Z_TYPE_P(dim)) {
- case IS_UNDEF:
+ case IS_UNDEF: {
+ /* The array may be destroyed while throwing the notice.
+ * Temporarily increase the refcount to detect this situation. */
+ if (!(GC_FLAGS(ht) & IS_ARRAY_IMMUTABLE)) {
+ GC_ADDREF(ht);
+ }
ZVAL_UNDEFINED_OP2();
+ if (!(GC_FLAGS(ht) & IS_ARRAY_IMMUTABLE) && !GC_DELREF(ht)) {
+ zend_array_destroy(ht);
+ return IS_NULL;
+ }
+ if (EG(exception)) {
+ return IS_NULL;
+ }
/* break missing intentionally */
+ }
case IS_NULL:
value->str = ZSTR_EMPTY_ALLOC();
return IS_STRING;