ddeboer/data-import — pull request #12 by spib (2013-02-04 18:09:42+00:00)
Title: Fix for CsvReader passing null items into the workflow

I'm seeing an issue with the CsvReader where it passes an empty $item when iterating a source file (typically this is the last line in the file). The actual error which gets thrown is

PHP Catchable fatal error: Argument 1 passed to Ddeboer\DataImport\Workflow::filterItem() must be an array, null given, called in /app/vendor/ddeboer/data-import/src/Ddeboer/DataImport/Workflow.php on line 203 and defined in /app/vendor/ddeboer/data-import/src/Ddeboer/DataImport/Workflow.php on line 243

Although this is caused by the CsvReader, my fix is in the Workflow class as it will protect against similar errors coming from other reader implementations.