1
0
mirror of https://github.com/php/php-src.git synced 2026-04-21 15:08:16 +02:00

Serialize as reference only if it's a true reference

This commit is contained in:
Stanislav Malyshev
2000-11-06 18:09:51 +00:00
parent efd8117fd4
commit 7f1dc85574
+1 -1
View File
@@ -178,7 +178,7 @@ void php_var_serialize(pval *buf, pval **struc, HashTable *var_hash)
HashTable *myht;
BLS_FETCH();
if(var_hash != NULL && php_add_var_hash(var_hash,*struc,(void *)&var_already) == FAILURE) {
if(var_hash != NULL && (*struc)->is_ref && php_add_var_hash(var_hash,*struc,(void *)&var_already) == FAILURE) {
slen = sprintf(s,"R:%ld;",*var_already);
STR_CAT(buf, s, slen);
return;