diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2019-10-10 14:44:53 +0200 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2019-10-10 14:44:53 +0200 |
commit | 2118f6a898297c9705ac652ad38f79590f80885b (patch) | |
tree | 01920fbb2d0055ee83887fe58ddd93cb15fa6745 /Zend | |
parent | fea482ee5c3bd173d8f5c3523653f79f52d8c189 (diff) | |
parent | 4463acb9513dfb62206760c49b3da1fe4d92f40a (diff) | |
download | php-git-2118f6a898297c9705ac652ad38f79590f80885b.tar.gz |
Merge branch 'PHP-7.4'
Diffstat (limited to 'Zend')
-rw-r--r-- | Zend/zend_execute.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index e6edbf6685..d4f8ed0012 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -2584,7 +2584,7 @@ static zend_never_inline zend_bool zend_handle_fetch_obj_flags( } 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; } } @@ -2600,7 +2600,7 @@ static zend_never_inline zend_bool zend_handle_fetch_obj_flags( 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); @@ -2641,7 +2641,7 @@ static zend_always_inline void zend_fetch_property_address(zval *result, zval *c } zend_throw_non_object_error(container, prop_ptr OPLINE_CC EXECUTE_DATA_CC); - ZVAL_ERROR(result); + ZVAL_UNDEF(result); return; } while (0); } @@ -2728,8 +2728,7 @@ static zend_always_inline void zend_assign_to_property_reference(zval *container 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(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"); |