diff options
Diffstat (limited to 'ext/standard/var.c')
| -rw-r--r-- | ext/standard/var.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/standard/var.c b/ext/standard/var.c index 9f48063f25..98efdcc7f3 100644 --- a/ext/standard/var.c +++ b/ext/standard/var.c @@ -677,7 +677,7 @@ static inline zend_long php_add_var_hash(php_serialize_data_t data, zval *var) / if (zv) { /* References are only counted once, undo the data->n increment above */ - if (is_ref) { + if (is_ref && Z_LVAL_P(zv) != -1) { data->n -= 1; } |
