Catch when no amount info is present.

This commit is contained in:
James Cole 2018-01-06 19:17:35 +01:00
parent ea0980ba83
commit d7b1892bda
No known key found for this signature in database
GPG Key ID: C16961E655E74B5E

View File

@ -302,6 +302,10 @@ class ImportJournal
if (0 === count($info)) {
throw new FireflyException('No amount information for this row.');
}
$class = $info['class'] ?? '';
if (strlen($class) === 0) {
throw new FireflyException('No amount information (conversion class) for this row.');
}
Log::debug(sprintf('Converter class is %s', $info['class']));
/** @var ConverterInterface $amountConverter */