Bug #77903 [Csd]: ArrayIterator stops iterating after offsetSet call

From: Date: Tue, 16 Apr 2019 13:38:17 +0000
Subject: Bug #77903 [Csd]: ArrayIterator stops iterating after offsetSet call
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-220485@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=77903&edit=1 ID: 77903 User updated by: gituser at yandex dot com Reported by: gituser at yandex dot com Summary: ArrayIterator stops iterating after offsetSet call Status: Closed Type: Bug Package: SPL related Operating System: Ubuntu 18.10 (64-bit) PHP Version: 7.3.4 Assigned To: nikic Block user comment: N Private report: N New Comment: -i had to read- _i should have read_ Previous Comments: ------------------------------------------------------------------------ [2019-04-16 13:32:43] gituser at yandex dot com ah, now i see. excuse me for asking stupid questions about tests. i had to read all links you provided first, and only then ask questions :) you're following tdd, right? i didn't expect the bug will be fixed so quickly, thank you for good job! ------------------------------------------------------------------------ [2019-04-16 13:21:32] gituser at yandex dot com p.s. * -it hasn't though as- _it doesn't have to though, as_ excuse me my English :) ------------------------------------------------------------------------ [2019-04-16 13:19:46] gituser at yandex dot com hmm... it seems that the php bugtracker itself has a bug and doesn't recognize the period if it is in the end of the post (it hasn't though, as the specs allows that). you may report it if you want :) (i won't - i feel too lazy for that :) ------------------------------------------------------------------------ [2019-04-16 13:15:46] gituser at yandex dot com btw, when you post a uri in plain text, make sure that you don't put any non-space char in the immediate vicinity of it. e.g. if you want to put a period directly after this uri, don't forget to add a space between them. the uri specification forbids space chars, thus the uri parser will detect that the period isn't part of the uri. and if you don't, it may decide that the period IS its part (since the uri specification allows that), thus breaking your uri. e.g. the uri you provided https://github.com/php/php-src/commit/9a9eed472b05292f8e8aa82129ea5d1da4b0e0c2. returns the 404 status code. it wouldn't if there was a space: https://github.com/php/php-src/commit/9a9eed472b05292f8e8aa82129ea5d1da4b0e0c2 . ------------------------------------------------------------------------ [2019-04-16 13:14:46] nikic@php.net @gituser: A regression test for this issue has been added when the bug was fixed, see https://github.com/php/php-src/blob/master/ext/spl/tests/bug77903.phpt. PHP does not use unit tests, all tests are integration tests. As to why this was not spotted by any of the existing tests: None of them were testing the exact sequence of operations necessary to trigger this bug. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=77903 -- Edit this bug report at https://bugs.php.net/bug.php?id=77903&edit=1

« previous php.bugs (#220485) next »