1
0
mirror of https://github.com/php/php-src.git synced 2026-03-29 19:52:20 +02:00

Fixed reference separation

This commit is contained in:
Dmitry Stogov
2014-03-18 12:37:51 +04:00
parent e47c080ce8
commit 2adecc6dc2

View File

@@ -642,7 +642,10 @@ write_std_property:
/* if we assign referenced variable, we should separate it */
if (Z_REFCOUNTED_P(value)) {
if (Z_ISREF_P(value)) {
ZVAL_DUP(value, Z_REFVAL_P(value));
zval tmp;
ZVAL_DUP(&tmp, Z_REFVAL_P(value));
value = &tmp;
} else {
Z_ADDREF_P(value);
}