PHP :: Bug #68128 :: Regression in RecursiveRegexIterator
| Bug #68128 | Regression in RecursiveRegexIterator | ||||
|---|---|---|---|---|---|
| Submitted: | 2014-10-01 22:00 UTC | Modified: | 2014-10-06 01:11 UTC | ||
| From: | ivan dot enderlin at hoa-project dot net | Assigned: | |||
| Status: | Closed | Package: | *General Issues | ||
| PHP Version: | master-Git-2014-10-01 (Git) | OS: | |||
| Private report: | No | CVE-ID: | None | ||
[2014-10-01 22:00 UTC] ivan dot enderlin at hoa-project dot net
Description: ------------ There is a regression in the RecursiveRegexIterator iterator. Detected by the failure of a test in the Hoa\Iterator library. Test script from the documentation (http://php.net/recursiveregexiterator.construct). Test script: --------------- <?php $rArrayIterator = new RecursiveArrayIterator(array('test1', array('tet3', 'test4', 'test5'))); $rRegexIterator = new RecursiveRegexIterator($rArrayIterator, '/^test/', RecursiveRegexIterator::ALL_MATCHES); foreach ($rRegexIterator as $key1 => $value1) { if ($rRegexIterator->hasChildren()) { // print all children echo "Children: "; foreach ($rRegexIterator->getChildren() as $key => $value) { echo $value . " "; } echo "\n"; } else { echo "No children\n"; } } ?> Expected result: ---------------- No children Children: test4 test5 Actual result: -------------- Aucun fils disponible PHP Notice: Array to string conversion in /tmp/a.php on line 6 Notice: Array to string conversion in /tmp/a.php on line 6 Fils : test4 test5
Patches
Pull Requests
History
AllCommentsChangesGit/SVN commits
[2014-10-05 10:15 UTC] ivan dot enderlin at hoa-project dot net
[2014-10-05 12:45 UTC] ivan dot enderlin at hoa-project dot net
[2014-10-05 13:26 UTC] ivan dot enderlin at hoa-project dot net
[2014-10-06 07:06 UTC] ivan dot enderlin at hoa-project dot net