Catch the error in #760

This commit is contained in:
James Cole
2017-08-13 12:37:09 +02:00
parent ec636c95a1
commit f9c85d4d81
3 changed files with 8 additions and 2 deletions

View File

@@ -85,6 +85,7 @@ class ImportJournal
/**
* @return string
* @throws FireflyException
*/
public function getAmount(): string
{
@@ -102,6 +103,9 @@ class ImportJournal
}
}
}
if(bccomp($this->amount,'0') === 0) {
throw new FireflyException('Amount is zero.');
}
return $this->amount;
}