ID: 31926 Updated by: [EMAIL PROTECTED] Reported By: gms08701 at yahoo dot com -Status: Open +Status: Feedback Bug Type: SPL related Operating System: FreeBSD 5.3 PHP Version: 5CVS-2005-03-23 Assigned To: helly New Comment:
Please try using this CVS snapshot: http://snaps.php.net/php5-latest.tar.gz For Windows: http://snaps.php.net/win32/php5-win32-latest.zip I can't reproduce this. Are you sure it's just something wrong with your system? Can you reproduce it on other machines? Previous Comments: ------------------------------------------------------------------------ [2005-02-13 15:27:10] [EMAIL PROTECTED] Please do the following: php run-tests.php ext/spl and copy the output here if you have also this: memcheck php ext/spl/tests/bug31926.php but just report if it states any real errors besides the messages stating that some memory is still accessible at program end. For me the problem is solved both in HEAD and 5.0.4-dev but i don't use FreeBSD. ------------------------------------------------------------------------ [2005-02-11 03:10:21] gms08701 at yahoo dot com Description: ------------ Trying to create a RecursiveArrayIterator class, using currently available SPL classes. Its generating this error -> php in free(): warning: chunk is already free Apparently it works on win2k -> http://marc.theaimsgroup.com/?l=php-general&m=110807956115501&w=2 Reproduce code: --------------- <?php $array = array(0 => array('world')); class RecursiveArrayIterator extends ArrayIterator implements RecursiveIterator { function hasChildren() { return (is_array($this->current())); } function getChildren() { return new self($this->current()); } } $it = new RecursiveIteratorIterator(new RecursiveArrayIterator($array)); foreach($it as $key => $val) { var_dump($key, $val); } ?> Expected result: ---------------- $ php -f z.php int(0) string(5) "world" Actual result: -------------- $ php -f z.php int(0) string(5) "world" php in free(): warning: chunk is already free ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=31926&edit=1