mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-27 13:57:25 +00:00
Better fix for nullpointer.
This commit is contained in:
@@ -250,8 +250,9 @@ class AccountEnrichment implements EnrichmentInterface
|
|||||||
foreach ($currencies as $currency) {
|
foreach ($currencies as $currency) {
|
||||||
$this->currencies[(int) $currency->id] = $currency;
|
$this->currencies[(int) $currency->id] = $currency;
|
||||||
}
|
}
|
||||||
|
$this->currencies[0] = $this->native;
|
||||||
foreach ($this->currencies as $id => $currency) {
|
foreach ($this->currencies as $id => $currency) {
|
||||||
if (true === $currency && 0 !== (int) $id) {
|
if (true === $currency) {
|
||||||
throw new FireflyException(sprintf('Currency #%d not found.', $id));
|
throw new FireflyException(sprintf('Currency #%d not found.', $id));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user