History log of /PHP-8.1/Zend/tests/foreach_by_ref_to_property.phpt (Results 1 – 1 of 1)
Revision Date Author Comments
# 36f5d719 01-Jul-2021 Nikita Popov

Fix leak on foreach by ref assign to property

In this case we ended up creating an ASSIGN_OBJ_REF with VAR
result operand, which was not freed.

Fix this by implementing assign_r

Fix leak on foreach by ref assign to property

In this case we ended up creating an ASSIGN_OBJ_REF with VAR
result operand, which was not freed.

Fix this by implementing assign_ref_znode the same was as
assign_znode, i.e. performing an assignment with result and
then freeing the result, which will result mark the result as
UNUSED. This is more robust than the special handling for
result == NULL that was used before.

This fixes one of the issues reported in bug #81190.

show more ...