|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-05-02 13:29 UTC] colder@php.net
[2009-05-06 15:29 UTC] ralph at smashlabs dot com
[2018-07-09 20:55 UTC] claudio at z-files dot de
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 02 02:00:01 2025 UTC |
Description: ------------ Attempting to change the IteratorMode throws an exception. The is probably due to the code that changes the LIFO/FIFO ordering that is also settable via the inherited method of SplDoublyLinkedList::setIteratorMode(). Reproduce code: --------------- <?php $s = new SPLStack(); $s->setIteratorMode(SplDoublyLinkedList::IT_MODE_DELETE); Expected result: ---------------- Do not throw exception on the following use cases: ->setIteratorMode(SplDoublyLinkedList::IT_MODE_DELETE) ->setIteratorMode(SplDoublyLinkedList::IT_MODE_KEEP) Actual result: -------------- PHP Fatal error: Uncaught exception 'RuntimeException' with message 'Iterators' LIFO/FIFO modes for SplStack/SplQueue objects are frozen' in path/to/test-splstack.php:4 Stack trace: #0 path/to/test-splstack.php(4): SplDoublyLinkedList->setIteratorMode(1) #1 {main} thrown in path/to/test-splstack.php on line 4