[php-src] master: tree: pass dummy zend_ulong to zend_hash_get_current_key_ex()

From: Date: Sun, 22 Nov 2026 17:44:39 +0000
Subject: [php-src] master: tree: pass dummy zend_ulong to zend_hash_get_current_key_ex()
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-144037@lists.php.net to get a copy of this message
Author: Gina Peter Banyard (Girgias) Date: 2026-11-22T17:44:36Z Commit: https://github.com/php/php-src/commit/1460ed1af201b090bc89fdf56684e244cc57230d Raw diff: https://github.com/php/php-src/commit/1460ed1af201b090bc89fdf56684e244cc57230d.diff tree: pass dummy zend_ulong to zend_hash_get_current_key_ex() In anticipation of marking the function ZEND_ATTRIBUTE_NONNULL Changed paths: M ext/dom/token_list.c M ext/spl/spl_array.c Diff: diff --git a/ext/dom/token_list.c b/ext/dom/token_list.c index 4adaf94c203d..7f2ee5b516e7 100644 --- a/ext/dom/token_list.c +++ b/ext/dom/token_list.c @@ -302,7 +302,9 @@ static void dom_token_list_item_read(dom_token_list_object *token_list, zval *re index--; } zend_string *str_index; - zend_hash_get_current_key_ex(token_set, &str_index, NULL, &position); + zend_ulong unused; + zend_hash_get_current_key_ex(token_set, &str_index, &unused, &position); + ZEND_ASSERT(str_index != NULL); ZVAL_STR_COPY(retval, str_index); } else { /* Not an out of bounds ValueError, but NULL, as according to spec. diff --git a/ext/spl/spl_array.c b/ext/spl/spl_array.c index 9ca034e72abb..27d61947c3ce 100644 --- a/ext/spl/spl_array.c +++ b/ext/spl/spl_array.c @@ -1574,7 +1574,9 @@ static zval *spl_array_it_get_current_data(zend_object_iterator *iter) /* {{{ */ && Z_TYPE(object->array) == IS_OBJECT && !(object->ar_flags & (SPL_ARRAY_IS_SELF|SPL_ARRAY_USE_OTHER))) { zend_string *key; - zend_hash_get_current_key_ex(aht, &key, NULL, spl_array_get_pos_ptr(aht, object)); + zend_ulong unused; + zend_hash_get_current_key_ex(aht, &key, &unused, spl_array_get_pos_ptr(aht, object)); + ZEND_ASSERT(key != NULL); zend_class_entry *ce = Z_OBJCE(object->array); zend_property_info *prop_info = zend_get_property_info(ce, key, true); ZEND_ASSERT(prop_info != ZEND_WRONG_PROPERTY_INFO);

« previous php.cvs (#144037) next »