mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-04 03:43:07 +00:00
Fix #8276
This commit is contained in:
@@ -29,6 +29,7 @@ use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Models\CurrencyExchangeRate;
|
||||
use FireflyIII\Models\TransactionCurrency;
|
||||
use FireflyIII\Support\CacheProperties;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
/**
|
||||
* Class ExchangeRateConverter
|
||||
@@ -78,7 +79,9 @@ class ExchangeRateConverter
|
||||
$second = $this->getEuroRate($to, $date);
|
||||
|
||||
// combined (if present), they can be used to calculate the necessary conversion rate.
|
||||
if ('0' === $first || '0' === $second) {
|
||||
if (0 === bccomp('0', $first) || 0 === bccomp('0', $second)) {
|
||||
Log::warning(sprintf('$first is "%s" and $second is "%s"', $first, $second));
|
||||
|
||||
return '0';
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user