summaryrefslogtreecommitdiff
path: root/Zend/zend_execute.c
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/zend_execute.c')
-rw-r--r--Zend/zend_execute.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c
index 006a5a1d7d..86df4f760e 100644
--- a/Zend/zend_execute.c
+++ b/Zend/zend_execute.c
@@ -1090,7 +1090,6 @@ static zend_never_inline void zend_assign_to_object_dim(zval *retval, zval *obje
{
zend_free_op free_value;
zval *value = get_zval_ptr_deref(value_type, value_op, execute_data, &free_value, BP_VAR_R);
- zval tmp;
/* Note: property_name in this case is really the array index! */
if (!Z_OBJ_HT_P(object)->write_dimension) {
@@ -1101,10 +1100,8 @@ static zend_never_inline void zend_assign_to_object_dim(zval *retval, zval *obje
/* separate our value if necessary */
if (value_type == IS_CONST) {
- if (UNEXPECTED(Z_OPT_COPYABLE_P(value))) {
- ZVAL_COPY_VALUE(&tmp, value);
- zval_copy_ctor_func(&tmp);
- value = &tmp;
+ if (UNEXPECTED(Z_REFCOUNTED_P(value))) {
+ Z_ADDREF_P(value);
}
}