[php-src] PR #13188: Fix iterator position resetting
| From: | iluuu1994 | Date: | Thu, 18 Jan 2024 15:05:53 +0000 |
| Subject: | [php-src] PR #13188: Fix iterator position resetting | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-24822@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/13188
Author: iluuu1994
Previously, when an array was converted from packed to hashed, iterators would not be correctly
reset to 0. Similarly, removing the last element from an array would decrease nNumUsed but not
actually fix the iterator position, causing the element to be skipped in the next iteration.
Some code was also removed that skips over IS_UNDEF elements for nInternalPointer and iterator
positions. This is unnecessary, as this already happens during iteration.
Closes GH-13178