ID:               35821
 Updated by:       [EMAIL PROTECTED]
 Reported By:      sfilteau at kronostechnologies dot com
-Status:           Assigned
+Status:           Closed
 Bug Type:         Reproducible crash
 Operating System: Gentoo
 PHP Version:      5.1.1
 Assigned To:      tony2001
 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:
------------------------------------------------------------------------

[2005-12-27 22:43:41] sfilteau at kronostechnologies dot com

Description:
------------
In command line, php do a segfault when calling array_map with a
callback function that throw an exception.

Reproduce code:
---------------
<?php

class Element
{
        public function ThrowException ()
        {
                echo "This line will do a Segfault : ";
                throw new Exception('How to do a segfault?');
        }

        public static function CallBack(Element $elem)
        {
                $elem->ThrowException();
        }
}

$arr = array(new Element(), new Element(), new Element());
array_map(array('Element', 'CallBack'), $arr);

?>

Expected result:
----------------
This line will do a Segfault : This line will do a Segfault : This line
will do a Segfault : 

Actual result:
--------------
[EMAIL PROTECTED] ~ $ ./testarraymap.php
This line will do a Segfault : Segmentation fault


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


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

Reply via email to