Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for skipping blank lines #5

Closed
wants to merge 2 commits into from
Closed

Add support for skipping blank lines #5

wants to merge 2 commits into from

Conversation

mbadolato
Copy link

No description provided.

Mark Badolato and others added 2 commits February 1, 2012 18:15
If a CSV file begins with a blank line (before the header), the EasyCSV library will bomb. This is because fgetcsv() returns an array with a single item (with a value of null) when it encounters a blank line. So, in a case where the 1st line is blank, the header row get set to a one-item array. When the 1st real line of data is read (the header row), the array size of the row will not match the single-item array size of $this->_headers, and we get an error.
Change the default value for $skipBlanks to ensure backwards compatibility.
@mbadolato
Copy link
Author

The test suite wouldn't run for me and I didn't have a change to track down why, so I have not added a test for the new functionality yet, nor have I been able to run a regression test.

@jwage jwage closed this Jan 12, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants