com php-src: Merge branch 'PHP-7.4': Zend/zend_execute.c

From: Date: Thu, 10 Oct 2019 12:44:53 +0000
Subject: com php-src: Merge branch 'PHP-7.4': Zend/zend_execute.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-108863@lists.php.net to get a copy of this message
Commit: 2118f6a898297c9705ac652ad38f79590f80885b Author: Nikita Popov <nikita.ppv@gmail.com> Thu, 10 Oct 2019 14:44:53 +0200 Parents: fea482ee5c3bd173d8f5c3523653f79f52d8c189 4463acb9513dfb62206760c49b3da1fe4d92f40a Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=2118f6a898297c9705ac652ad38f79590f80885b Log: Merge branch 'PHP-7.4' Changed paths: MM Zend/zend_execute.c Diff: diff --cc Zend/zend_execute.c index e6edbf6685c,368d6b2dcc8..d4f8ed00128 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@@ -2584,7 -2706,7 +2584,7 @@@ static zend_never_inline zend_bool zend } 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 -2737,7 +2600,7 @@@ 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); @@@ -2640,16 -2775,17 +2640,16 @@@ static zend_always_inline void zend_fet 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); @@@ -2728,8 -2858,7 +2728,7 @@@ static zend_always_inline void zend_ass 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");

« previous php.cvs (#108863) next »