Skip to content

Conversation

arnaud-lb
Copy link
Member

Fixes GH-16371

WeakMap's implementation of zend_object_iterator_funcs.get_current_key doesn't handle invalid states.

Here I set the key to NULL in zend_weakmap_iterator_get_current_get() when there is no more elements. This matches other implementations of zend_object_iterator_funcs.get_current_key as well as the documentation of Iterator::key.

@arnaud-lb arnaud-lb changed the base branch from master to PHP-8.2 October 14, 2024 12:12
@arnaud-lb arnaud-lb marked this pull request as ready for review October 14, 2024 16:00
@arnaud-lb arnaud-lb closed this in 1d94fb8 Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Assertion failure in Zend/zend_weakrefs.c:646

2 participants