From: Nikita Popov Date: Thu, 10 Oct 2019 08:08:32 +0000 (+0200) Subject: Merge branch 'PHP-7.4' X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=51501dacb16f11ad375a99b31092c86b74f72a4f;p=php Merge branch 'PHP-7.4' --- 51501dacb16f11ad375a99b31092c86b74f72a4f diff --cc Zend/zend_execute.c index 2c54474119,b69d0a88d5..e6edbf6685 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@@ -2733,7 -2862,10 +2733,8 @@@ static zend_always_inline void zend_ass variable_ptr = &EG(uninitialized_zval); } else if (UNEXPECTED(Z_TYPE(variable) != IS_INDIRECT)) { zend_throw_error(NULL, "Cannot assign by reference to overloaded object"); + zval_ptr_dtor(&variable); variable_ptr = &EG(uninitialized_zval); - } else if (/*OP_DATA_TYPE == IS_VAR &&*/ UNEXPECTED(Z_ISERROR_P(value_ptr))) { - variable_ptr = &EG(uninitialized_zval); } else if (/*OP_DATA_TYPE == IS_VAR &&*/ (opline->extended_value & ZEND_RETURNS_FUNCTION) && UNEXPECTED(!Z_ISREF_P(value_ptr))) {