We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cacc12d commit 6133455Copy full SHA for 6133455
1 file changed
ext/standard/array.c
@@ -4501,7 +4501,7 @@ PHP_FUNCTION(array_count_values)
4501
if ((tmp = zend_symtable_find(Z_ARRVAL_P(return_value), Z_STR_P(entry))) == NULL) {
4502
zval data;
4503
ZVAL_LONG(&data, 1);
4504
- zend_symtable_add(Z_ARRVAL_P(return_value), Z_STR_P(entry), &data);
+ zend_symtable_add_new(Z_ARRVAL_P(return_value), Z_STR_P(entry), &data);
4505
} else {
4506
Z_LVAL_P(tmp)++;
4507
}
0 commit comments