Skip to content
Snippets Groups Projects
Commit f630564b authored by Chris Leppanen's avatar Chris Leppanen
Browse files

Issue #2390199 by GuyPaddock: Unhelpful failure upon uploading an empty CSV file

parent fce13c29
No related branches found
No related tags found
No related merge requests found
......@@ -28,7 +28,8 @@ class FeedsCSVParser extends FeedsParser {
// Get first line and use it for column names, convert them to lower case.
$header = $this->parseHeader($parser, $iterator);
if (!$header) {
return FeedsParserResult();
drupal_set_message(t('The CSV file is empty.'), 'warning', FALSE);
return new FeedsParserResult();
}
$parser->setColumnNames($header);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment