diff --git a/NEWS b/NEWS index 76a4e6692d1..30db43d9c9f 100644 --- a/NEWS +++ b/NEWS @@ -39,6 +39,7 @@ PHP NEWS - Fixed PECL bug #11216 (crash in ZipArchive::addEmptyDir when a directory already exists). (Pierre) +- Fixed bug #41865 (fputcsv(): 2nd parameter is not optional). (Jani) - Fixed bug #41813 (segmentation fault when using string offset as an object). (judas dot iscariote at gmail dot com, Tony) - Fixed bug #41795 (checkdnsrr does not support DNS_TXT type). diff --git a/ext/standard/file.c b/ext/standard/file.c index e6dd5d71a43..a153d1cf878 100644 --- a/ext/standard/file.c +++ b/ext/standard/file.c @@ -1914,7 +1914,7 @@ PHP_FUNCTION(fputcsv) int count, i = 0; smart_str csvline = {0}; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r|ass", + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ra|ss", &fp, &fields, &delimiter_str, &delimiter_str_len, &enclosure_str, &enclosure_str_len) == FAILURE) { return;