// Read full "CSV line"
$csvData = $csvFileInstance->readCsvFileLine($this->columnSeparator, self::CRAWL_ENTRY_SIZE);
+ // Is $csvData set?
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('CRAWLER-UPLOADED-LIST-URL-SOURCE: csvData[]=%s', gettype($csvData)));
+ if (!is_array($csvData)) {
+ // Is not array, then reading the file has reached EOF
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CRAWLER-UPLOADED-LIST-URL-SOURCE: EXIT!');
+ return;
+ }
+
// Is the array empty?
- /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('CRAWLER-UPLOADED-LIST-URL-SOURCE: csvData[%s]=%s', gettype($csvData), print_r($csvData, TRUE)));
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('CRAWLER-UPLOADED-LIST-URL-SOURCE: csvData(%d)=%s', count($csvData), print_r($csvData, TRUE)));
if (count($csvData) == 0) {
// Try to close it by actually unsetting (destructing) it
/* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('CRAWLER-UPLOADED-LIST-URL-SOURCE: File "%s" has been fully read.', $csvFileInstance->getFilename()));