]> granicus.if.org Git - php/commit
Fixed bug #71030
authorNikita Popov <nikita.ppv@gmail.com>
Thu, 9 May 2019 12:19:53 +0000 (14:19 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Thu, 9 May 2019 12:31:39 +0000 (14:31 +0200)
commitd0a56f707f9b043d9af512524e9c486044cbf510
tree17a1432394749a18e1a109f6c99c694c45c36a61
parent4b40a46bf157c2e26714dffdf6c78b2bb85f24ab
Fixed bug #71030

Make sure to always fetch the RHS of a list assignment first, instead
of special casing known self-assignments, which will not detect cases
using references correctly.

As a side-effect, it is no longer possible to do something like
byRef(list($x) = $y). This worked by accident previously, but only
if $y was a CV and the self-assignment case did not trigger.
However it shouldn't work for the same reason that byRef($x = $y)
doesn't. Conversely byRef(list(&$x) = $y) and byRef($x =& $y)
continue to be legal.
NEWS
UPGRADING
Zend/tests/bug71030.phpt [new file with mode: 0644]
Zend/tests/bug73663.phpt
Zend/zend_compile.c