|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-07-26 19:13 UTC] stas@php.net
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 15 12:00:01 2025 UTC |
Description: ------------ Please, check the code. P.S. When $this is returned instead of "null" you do get the correct error message, but PHP still crashes. P.P.S. What do we have Traversable interface for? Reproduce code: --------------- <?php class ArrayObj extends ArrayObject { function getIterator() { return $this; } } foreach(new ArrayObj(array(123)) as $idx => $line) { echo "$idx: $line\n"; } ?> Expected result: ---------------- Warning: Objects returned by ArrayObj::getIterator() must be traversable or implement interface Iterator in ... on line 7 Actual result: -------------- *SILENT CRASH*