Merge branch 'PHP-8.0'

* PHP-8.0:
  Fixed bug #80173
This commit is contained in:
Nikita Popov 2021-07-02 10:08:57 +02:00
commit 53fba3a13d
2 changed files with 14 additions and 1 deletions

View File

@ -0,0 +1,12 @@
--TEST--
Using return of property assignment to reference that destroys object
--FILE--
<?php
$a = new stdClass;
$a->a =& $a;
var_dump($a->a = 0);
?>
--EXPECT--
int(0)

View File

@ -738,7 +738,8 @@ ZEND_API zval *zend_std_write_property(zend_object *zobj, zend_string *name, zva
}
found:
zend_assign_to_variable(variable_ptr, value, IS_TMP_VAR, property_uses_strict_types());
variable_ptr = zend_assign_to_variable(
variable_ptr, value, IS_TMP_VAR, property_uses_strict_types());
goto exit;
}
if (Z_PROP_FLAG_P(variable_ptr) == IS_PROP_UNINIT) {