ID: 46873 Updated by: [email protected] Reported By: christian at enovo dot dk -Status: Assigned +Status: Closed Bug Type: Reproducible crash Operating System: * PHP Version: 5.*-CVS (2008-12-16) Assigned To: lbarnaud 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: ------------------------------------------------------------------------ [2008-12-26 11:58:26] [email protected] *Arnaud I suppose http://cvs.php.net/viewvc.cgi/php-src/ext/standard/array.c?r1=1.308.2.21.2.58&r2=1.308.2.21.2.59 (Fixed bugs #44181 & #44182 (extract() and references)) ------------------------------------------------------------------------ [2008-12-26 11:53:31] [email protected] Hi Arnald, that patch broken this. ------------------------------------------------------------------------ [2008-12-17 11:14:20] [email protected] I can't reproduce this using 5.3 from today: bj...@jessica:/usr/src/php/5.3$ sapi/cli/php t.php PHP Warning: Invalid argument supplied for foreach() in /usr/src/php/5.3/t.php on line 12 ------------------------------------------------------------------------ [2008-12-16 18:03:35] [email protected] Output with reduced test script: # src/build/php_5_2/sapi/cli/php t.php Segmentation fault # src/build/php_5_3/sapi/cli/php t.php Segmentation fault # src/build/php_6/sapi/cli/php t.php Warning: Invalid argument supplied for foreach() in /home/jani/t.php on line 12 So it seems the bug is only in PHP_5* branches. ------------------------------------------------------------------------ [2008-12-16 03:08:53] crrodriguez at opensuse dot org reduced test case <?php $data = array ( 'level0' => array( 'level1' ) ); $flattened = flatten($data); function flatten($data, $separator = array()) { extract($separator, EXTR_OVERWRITE); foreach ($data as $key => $val) { flatten($val, array('separator' => $separator)); } } ?> ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/46873 -- Edit this bug report at http://bugs.php.net/?id=46873&edit=1
