Fixed strict type exception occuring in UpdateExchangeRatesCommand.

This commit is contained in:
Jan Böhmer 2020-01-05 22:10:52 +01:00
parent bce9061c62
commit 97f8afbc40

View file

@ -103,7 +103,7 @@ class UpdateExchangeRatesCommand extends Command
foreach ($candidates as $currency) {
try {
$rate = $swap->latest($currency->getIsoCode().'/'.$this->base_current);
$currency->setExchangeRate($rate->getValue());
$currency->setExchangeRate((string) $rate->getValue());
$io->note(sprintf('Set exchange rate of %s to %f', $currency->getIsoCode(), $currency->getExchangeRate()));
$this->em->persist($currency);