#41865 [Opn->Csd]: fputcsv(): 2nd parameter is not optional
ID: 41865
Updated by: sniper@php.net
Reported By: machour at gmail dot com
-Status: Open
+Status: Closed
Bug Type: Reproducible crash
Operating System: Linux
PHP Version: 5.2.3
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.
Nice catch. :)
Previous Comments:
------------------------------------------------------------------------
[2007-07-01 21:20:52] machour at gmail dot com
Description:
------------
Hi,
The $fields parameter should be made mandatory on fputcsv() for two
reason:
1. Calling fputcsv($fp) doesn't make sense (to me at least)
2. Calling fputcsv($fp) segfaults
Please change the C source to look like
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ra|ss",
instead of
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r|ass",
(/ext/standard/file.c:1999 in HEAD)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=41865&edit=1
Thread (2 messages)