Bug #12929 Updated: crash in array_map with associative arrays
| From: | andrei@php.net | Date: | Fri, 24 Aug 2001 02:00:30 +0000 |
| Subject: | Bug #12929 Updated: crash in array_map with associative arrays | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-64209@lists.php.net to get a copy of this message | ||
ID: 12929
Updated by: andrei
Reported By: wico@cnh.nl
Old Status: Assigned
Status: Closed
Bug Type: Reproducible crash
Operating System: linux
PHP Version: 4.0.6
Assigned To: andrei
New Comment:
Fixed in CVS.
Previous Comments:
------------------------------------------------------------------------
[2001-08-23 21:06:14] andrei@php.net
I can fix the crash, but what should be done with the keys? Should they be just ignored? I think it
only makes sense to preserve them if you are mapping a single arrays, in case there are 2 or more,
the keys are useless.. agree?
------------------------------------------------------------------------
[2001-08-23 12:38:35] wico@cnh.nl
Have fun:
<?
$data = Array('a','b','c'); // works
# $data = Array(1 => 'a', 2 => 'b', 3 => 'c'); // crash
# $data = Array('1' => 'a', '2' => '3'); // crash
$plop = array_map('addslashes', $data);
die("I didn't crash :)");
?>
------------------------------------------------------------------------
Edit this bug report at http://bugs.php.net/?id=12929&edit=1