Skip to content

Commit

Permalink
Fix #193: Passing array item by reference breaks \DS\Set behaviour
Browse files Browse the repository at this point in the history
Dereference references in add_array_to_set()
  • Loading branch information
nielsdos committed Dec 18, 2023
1 parent 9061a39 commit 28e6f6a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/ds/ds_set.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ static inline void add_array_to_set(ds_set_t *set, HashTable *array)
{
zval *value;
ZEND_HASH_FOREACH_VAL(array, value) {
ZVAL_DEREF(value);
ds_set_add(set, value);
}
ZEND_HASH_FOREACH_END();
Expand Down

0 comments on commit 28e6f6a

Please sign in to comment.