mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-03 03:00:14 +00:00
Catch null
This commit is contained in:
@@ -183,6 +183,14 @@ class ExchangeRateConverter
|
||||
;
|
||||
++$this->queryCount;
|
||||
$rate = (string) $result?->rate;
|
||||
|
||||
if ('' === $rate) {
|
||||
return null;
|
||||
}
|
||||
if('0' === $rate) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$cache->store($rate);
|
||||
|
||||
// if the rate has not been cached during this particular run, save it
|
||||
@@ -198,10 +206,6 @@ class ExchangeRateConverter
|
||||
],
|
||||
];
|
||||
|
||||
if ('' === $rate) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $rate;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user