Skip to content

Commit 2eb7e75

Browse files
committed
Let's only read-only here
1 parent 7989db9 commit 2eb7e75

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/standard/var.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -958,7 +958,7 @@ static void php_var_serialize_intern(smart_str *buf, zval *struc, php_serialize_
958958
}
959959

960960
if (Z_ISREF_P(data) && Z_REFCOUNT_P(data) == 1) {
961-
ZVAL_UNREF(data);
961+
data = Z_REFVAL_P(data);
962962
}
963963

964964
/* we should still add element even if it's not OK,

0 commit comments

Comments
 (0)