diff --git a/Utils/Converter/Currency.php b/Utils/Converter/Currency.php index 6cbaaeb46..6a8b1bb7b 100755 --- a/Utils/Converter/Currency.php +++ b/Utils/Converter/Currency.php @@ -115,7 +115,12 @@ final class Currency self::$ecbCurrencies = []; foreach ($node as $key => $value) { - self::$ecbCurrencies[\strtoupper((string) $value->attributes()['currency'])] = (float) $value->attributes()['rate']; + /** @var null|array $attributes */ + if (($attributes = $value->attributes()) === null) { + continue; + } + + self::$ecbCurrencies[\strtoupper((string) ($attributes['currency']))] = (float) ($attributes['rate']); } } catch (\Throwable $t) { self::$ecbCurrencies = []; // @codeCoverageIgnore