mirror of
https://github.com/php/php-src.git
synced 2024-11-27 11:53:33 +08:00
Align error messages between normal VM and JIT for RW when using object as array (#12799)
This commit is contained in:
parent
d8ef868b92
commit
e94ab0461c
@ -1417,9 +1417,9 @@ static ZEND_COLD void zend_verify_missing_return_type(const zend_function *zf)
|
||||
zend_verify_return_error(zf, NULL);
|
||||
}
|
||||
|
||||
static zend_never_inline ZEND_COLD void ZEND_FASTCALL zend_use_object_as_array(void)
|
||||
static zend_never_inline ZEND_COLD void ZEND_FASTCALL zend_use_object_as_array(const zend_object *object)
|
||||
{
|
||||
zend_throw_error(NULL, "Cannot use object as array");
|
||||
zend_throw_error(NULL, "Cannot use object of type %s as array", ZSTR_VAL(object->ce->name));
|
||||
}
|
||||
|
||||
static zend_never_inline ZEND_COLD void ZEND_FASTCALL zend_illegal_offset(void)
|
||||
@ -1487,7 +1487,7 @@ static zend_never_inline void zend_binary_assign_op_obj_dim(zend_object *obj, zv
|
||||
}
|
||||
zval_ptr_dtor(&res);
|
||||
} else {
|
||||
zend_use_object_as_array();
|
||||
zend_use_object_as_array(obj);
|
||||
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
|
||||
ZVAL_NULL(EX_VAR(opline->result.var));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user