neerja-tekmindz / parsecsv-for-php

Automatically exported from code.google.com/p/parsecsv-for-php
MIT License
0 stars 0 forks source link

First key values per row not trim()'d #29

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
In parseCSV v0.3.2

When parsing a csv, I was finding the first key value of each row was prepended 
with a \n or \r, not sure which.

I think the problem lies on line 380:
if ( !$was_enclosed ) $current = trim($current);

I fixed the issue I was experiencing by changing line 382 to:
$row[$key] = trim($current);

Original issue reported on code.google.com by John.Sta...@gmail.com on 19 Jun 2013 at 3:41