summaryrefslogtreecommitdiff
path: root/ext/xmlreader/php_xmlreader.c
diff options
context:
space:
mode:
authorAlex Dowad <alexinbeijing@gmail.com>2020-04-23 10:45:20 +0200
committerNikita Popov <nikita.ppv@gmail.com>2020-05-12 17:22:31 +0200
commitd4d0852c2363fae2c7f979169ed8621379411a2c (patch)
treeaf6b5aae03f1e7048a1f3cb7d064ef5b696dff4f /ext/xmlreader/php_xmlreader.c
parent9999e7faa3f7fc9eb7f654b703faab9b18328229 (diff)
downloadphp-git-d4d0852c2363fae2c7f979169ed8621379411a2c.tar.gz
SplDoublyLinkedList uses iteration flags in iterator struct
The 'flags' field in spl_dllist_it was formerly unused. This means that if one started to iterate over an SplDoublyLinkedList using 'foreach', and then *changed* the iteration mode halfway, the 'foreach' loop would start iterating in the opposite direction. Probably this was not what was intended. Therefore, use the 'flags' field in spl_dllist_it for iteration via 'foreach'. For explicit iteration using methods like '::next()' and '::current()', continue to use the flags in the SplDoublyLinkedList object itself.
Diffstat (limited to 'ext/xmlreader/php_xmlreader.c')
0 files changed, 0 insertions, 0 deletions