mirror of
https://github.com/bdnugget/php-src.git
synced 2026-11-26 10:25:41 +00:00
Fixed reference separation
This commit is contained in:
1 parent
e47c080ce8
commit
2adecc6dc2
1 file changed
+4
-1
@@ -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);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user