Fixed reference separation

This commit is contained in:
Dmitry Stogov committed 2014-03-18 12:37:51 +04:00
1 parent e47c080ce8
commit 2adecc6dc2
1 file changed
+4 -1
+4 -1
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);
}