|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2014-09-11 09:46 UTC] doldev at snowgarden dot ch
[2021-07-20 22:14 UTC] cmb@php.net
-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: cmb
[2021-07-20 22:14 UTC] cmb@php.net
[2021-07-20 22:40 UTC] cmb@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 08:00:01 2025 UTC |
Description: ------------ If SplTempFileObject used with the LimitIterator in some cases it behave wrong. This might be related to #65600 . Even though if switching to an SplFileObject fixes the problem with the same input. Test script: --------------- <?php $content = <<<'EOF' Line 1 Line 2 Line 3 Line 4 EOF; $tmpCsvFile = new SplTempFileObject(); $tmpCsvFile->fwrite($content); $iterator = new CallbackFilterIterator($tmpCsvFile, function ($row) { return true; }); echo 'Limit 1: ', iterator_count(new LimitIterator($iterator, 2)), ' ', iterator_count(new LimitIterator($tmpCsvFile, 2)), "\n"; echo 'Limit 2: ', iterator_count(new LimitIterator($iterator, 3)), ' ', iterator_count(new LimitIterator($tmpCsvFile, 3)), "\n"; Expected result: ---------------- Limit 2: 2 2 Limit 3: 1 1 Actual result: -------------- Limit 2: 2 2 Limit 3: 1 0