- Fixed the filter extension accepting IPv4 octets with a leading 0 as that
belongs to the unsupported "dotted octal" representation. (Gustavo)
+- Fixed bug #53279 (SplFileObject doesn't initialise default CSV escape
+ character). (Adam)
- Fixed bug #53273 (mb_strcut() returns garbage with the excessive length parameter). (CVE-2010-4156) (Mateusz Kocielski, Pierre, Moriyoshi)
- Fixed bug #53248 (rawurlencode RFC 3986 EBCDIC support misses tilde char).
(Justin Martin)
intern->u.file.delimiter = ',';
intern->u.file.enclosure = '"';
+ intern->u.file.escape = '\\';
zend_hash_find(&intern->std.ce->function_table, "getcurrentline", sizeof("getcurrentline"), (void **) &intern->u.file.func_getCurr);
--- /dev/null
+--TEST--
+SplFileObject::fgetcsv with default escape character
+--FILE--
+<?php
+$fp = fopen('SplFileObject::fgetcsv.csv', 'w+');
+fwrite($fp, '"aa\"","bb","\"c"');
+fclose($fp);
+
+$fo = new SplFileObject('SplFileObject::fgetcsv.csv');
+var_dump($fo->fgetcsv());
+?>
+--CLEAN--
+<?php
+unlink('SplFileObject::fgetcsv.csv');
+?>
+--EXPECTF--
+array(3) {
+ [0]=>
+ string(4) "aa\""
+ [1]=>
+ string(2) "bb"
+ [2]=>
+ string(3) "\"c"
+}