diff --git a/Zend/zend_exceptions.c b/Zend/zend_exceptions.c index 062ba0f3b188..9702a335d461 100644 --- a/Zend/zend_exceptions.c +++ b/Zend/zend_exceptions.c @@ -462,8 +462,7 @@ ZEND_METHOD(Exception, getCode) ZEND_PARSE_PARAMETERS_NONE(); prop = GET_PROPERTY(ZEND_THIS, ZEND_STR_CODE); - ZVAL_DEREF(prop); - ZVAL_COPY(return_value, prop); + ZVAL_COPY_DEREF(return_value, prop); } /* }}} */ @@ -475,8 +474,7 @@ ZEND_METHOD(Exception, getTrace) ZEND_PARSE_PARAMETERS_NONE(); prop = GET_PROPERTY(ZEND_THIS, ZEND_STR_TRACE); - ZVAL_DEREF(prop); - ZVAL_COPY(return_value, prop); + ZVAL_COPY_DEREF(return_value, prop); } /* }}} */ @@ -488,8 +486,7 @@ ZEND_METHOD(ErrorException, getSeverity) ZEND_PARSE_PARAMETERS_NONE(); prop = GET_PROPERTY(ZEND_THIS, ZEND_STR_SEVERITY); - ZVAL_DEREF(prop); - ZVAL_COPY(return_value, prop); + ZVAL_COPY_DEREF(return_value, prop); } /* }}} */ diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index 14a340ffee37..9047550cafb0 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -1080,8 +1080,7 @@ static zend_never_inline zval* zend_assign_to_typed_prop(const zend_property_inf } } - ZVAL_DEREF(value); - ZVAL_COPY(&tmp, value); + ZVAL_COPY_DEREF(&tmp, value); if (UNEXPECTED(!i_zend_verify_property_type(info, &tmp, EX_USES_STRICT_TYPES()))) { zval_ptr_dtor(&tmp);