8000 Fix SIGABRT in PHP 8.4 · phpredis/phpredis@a75a7e5 · GitHub
[go: up one dir, main page]

Skip to content

Commit a75a7e5

Browse files
Fix SIGABRT in PHP 8.4
PHP switched from `ZEND_ASSUME` to `ZEND_ASSERT` when making sure `Z_PTR_P(zv)` was nonnull in `zend_hash_str_update_ptr`. This commit just switches to `zend_hash_str_add_empty_element` which is semantically more correct anyway. Fixes #2539
1 parent 9d38050 commit a75a7e5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cluster_library.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2995,7 +2995,7 @@ static zend_string **get_valid_seeds(HashTable *input, uint32_t *nseeds) {
29952995
}
29962996

29972997
/* Add as a key to avoid duplicates */
2998-
zend_hash_str_update_ptr(valid, Z_STRVAL_P(z_seed), Z_STRLEN_P(z_seed), NULL);
2998+
zend_hash_str_add_empty_element(valid, Z_STRVAL_P(z_seed), Z_STRLEN_P(z_seed));
29992999
} ZEND_HASH_FOREACH_END();
30003000

30013001
/* We need at least one valid seed */

0 commit comments

Comments
 (0)
0