ID:               29382
 Updated by:       [EMAIL PROTECTED]
 Reported By:      su1d at phpclub dot net
-Status:           Open
+Status:           Closed
 Bug Type:         Reproducible crash
 Operating System: Win32
 PHP Version:      5CVS-2004-07-26 (dev)
 New Comment:

This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.




Previous Comments:
------------------------------------------------------------------------

[2004-07-26 01:32:24] su1d at phpclub dot net

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*



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=29382&edit=1

Reply via email to