Commit 1460ed1af20 for php
commit 1460ed1af201b090bc89fdf56684e244cc57230d
Author: Gina Peter Banyard <girgias@php.net>
Date: Sun Nov 8 07:52:18 2026 +0000
tree: pass dummy zend_ulong to zend_hash_get_current_key_ex()
In anticipation of marking the function ZEND_ATTRIBUTE_NONNULL
diff --git a/ext/dom/token_list.c b/ext/dom/token_list.c
index 4adaf94c203..7f2ee5b516e 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 9ca034e72ab..27d61947c3c 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);