note 110627 added to splfileobject.fgetcsv
| From: | vaughn dot clayton+php at servicetrade dot com | Date: | Wed, 14 Nov 2012 14:15:32 +0000 |
| Subject: | note 110627 added to splfileobject.fgetcsv | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-191930@lists.php.net to get a copy of this message | ||
Note that due to bugs 55807 and 61032, introduced in 5.3.8, if the csv in example #2 has a newline
character at the end of each line, the foreach will execute 6 times.
The last time through the loop $row will be bool(false). This is true even if using
SplFileObject::SKIP_EMPTY and SplFileObject::DROP_NEW_LINE.
Until the bug is fixed, the workaround is to also add SplFileObject::READ_AHEAD to your setFlags()
call.
----
Server IP: 69.147.83.199
Probable Submitter: 66.194.31.1
----
Manual Page -- http://www.php.net/manual/en/splfileobject.fgetcsv.php
Edit -- https://master.php.net/note/edit/110627
Del: integrated -- https://master.php.net/note/delete/110627/integrated
Del: useless -- https://master.php.net/note/delete/110627/useless
Del: bad code -- https://master.php.net/note/delete/110627/bad+code
Del: spam -- https://master.php.net/note/delete/110627/spam
Del: non-english -- https://master.php.net/note/delete/110627/non-english
Del: in docs -- https://master.php.net/note/delete/110627/in+docs
Del: other reasons-- https://master.php.net/note/delete/110627
Reject -- https://master.php.net/note/reject/110627
Search -- https://master.php.net/manage/user-notes.php