}
if (!check_type_array_assignable(prop_info->type)) {
zend_throw_auto_init_in_prop_error(prop_info, "array");
-- if (result) ZVAL_ERROR(result);
++ if (result) ZVAL_UNDEF(result);
return 0;
}
}
if (Z_TYPE_P(ptr) == IS_UNDEF) {
if (!ZEND_TYPE_ALLOW_NULL(prop_info->type)) {
zend_throw_access_uninit_prop_by_ref_error(prop_info);
-- if (result) ZVAL_ERROR(result);
++ if (result) ZVAL_UNDEF(result);
return 0;
}
ZVAL_NULL(ptr);
return;
}
- container = make_real_object(container, prop_ptr OPLINE_CC EXECUTE_DATA_CC);
- if (UNEXPECTED(!container)) {
- ZVAL_ERROR(result);
- return;
- }
+ zend_throw_non_object_error(container, prop_ptr OPLINE_CC EXECUTE_DATA_CC);
- ZVAL_ERROR(result);
++ ZVAL_UNDEF(result);
+ return;
} while (0);
}
+
+ zobj = Z_OBJ_P(container);
if (prop_op_type == IS_CONST &&
- EXPECTED(Z_OBJCE_P(container) == CACHED_PTR_EX(cache_slot))) {
+ EXPECTED(zobj->ce == CACHED_PTR_EX(cache_slot))) {
uintptr_t prop_offset = (uintptr_t)CACHED_PTR_EX(cache_slot + 1);
- zend_object *zobj = Z_OBJ_P(container);
if (EXPECTED(IS_VALID_PROPERTY_OFFSET(prop_offset))) {
ptr = OBJ_PROP(zobj, prop_offset);
variable_ptr = Z_INDIRECT_P(variable_ptr);
}
- /* variable_ptr may be ERROR if fetching the property threw an exception. */
- if (UNEXPECTED(Z_ISERROR_P(variable_ptr))) {
- if (UNEXPECTED(Z_ISERROR_P(variable_ptr) || EG(exception))) {
++ if (UNEXPECTED(EG(exception))) {
variable_ptr = &EG(uninitialized_zval);
} else if (UNEXPECTED(Z_TYPE(variable) != IS_INDIRECT)) {
zend_throw_error(NULL, "Cannot assign by reference to overloaded object");