CsvExtractor (FileExtractorAbstract) carrier reference in extract()
zodimo opened this issue · comments
Hi
I am unable to use the CsvExtractor as indicated in the documentation.
// standalone
foreach($csvExtractor->getTraversable() as $record) {
// do something with $record array
}
I get the following error.
Error: Call to a member function getFlowMap() on null
Hello,
This is part of what v2 has fixed, it is pretty stable now (used in production) and I will release it as soon as I find the time to do it.
Until then, you can replace this line :
$this->getCarrier()->getFlowMap()->incrementNode($this->getId(), 'num_extract');
with :
$this->getCarrier() && $this->getCarrier()->getFlowMap()->incrementNode($this->getId(), 'num_extract');
here