diff --git a/CHANGELOG.txt b/CHANGELOG.txt index af783e72cebb825e9e0a50078fd480eb14fcdc64..453bc2494f688666f49e02802d559956c915211a 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,5 +1,10 @@ // $Id$ +Feeds 6.x 1.0 XXXXXXXXXXXXXXXXXX +-------------------------------- + +- #858684 alex_b: Fix notices when file not found. + Feeds 6.x 1.0 Beta 4, 2010-07-25 -------------------------------- diff --git a/plugins/FeedsCSVParser.inc b/plugins/FeedsCSVParser.inc index 96e747185c8ae7be98111f2c6db5ac6288efe476..a551bebf1b51e7a8e7f6f158816f6e1dfe757c61 100644 --- a/plugins/FeedsCSVParser.inc +++ b/plugins/FeedsCSVParser.inc @@ -22,6 +22,9 @@ class FeedsCSVParser extends FeedsParser { // Get first line and use it for column names, convert them to lower case. $parser->setLineLimit(1); $rows = $parser->parse($iterator); + if (!count($rows)) { + return; + } $header = array_shift($rows); foreach ($header as $i => $title) { $header[$i] = trim(drupal_strtolower($title)); diff --git a/plugins/FeedsFileFetcher.inc b/plugins/FeedsFileFetcher.inc index 271c0d331cdabc61d3f5768f53994e957ea7d1da..0ba80a9859c800d3ebd43917b72a5fced7ef4590 100644 --- a/plugins/FeedsFileFetcher.inc +++ b/plugins/FeedsFileFetcher.inc @@ -32,6 +32,9 @@ class FeedsFileBatch extends FeedsImportBatch { * Implementation of FeedsImportBatch::getFilePath(). */ public function getFilePath() { + if (!file_exists($this->file_path)) { + throw new Exception(t('File @filepath is not accessible.', array('@filepath' => $this->file_path))); + } return $this->file_path; } }