From fa424957b678adfaa8fe3622e73eb2ed9bde0a6f Mon Sep 17 00:00:00 2001 From: Lars Gebhardt-Kusche Date: Sun, 3 May 2026 01:02:54 +0200 Subject: [PATCH] asdsad --- modules/boersenchecker/src/Support/HomePage.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/modules/boersenchecker/src/Support/HomePage.php b/modules/boersenchecker/src/Support/HomePage.php index fdcb209..2768ac3 100644 --- a/modules/boersenchecker/src/Support/HomePage.php +++ b/modules/boersenchecker/src/Support/HomePage.php @@ -341,8 +341,8 @@ final class HomePage return null; } - $from = strtoupper(trim($from)) ?: $this->defaultReportCurrency; - $to = strtoupper(trim($to)) ?: $this->defaultReportCurrency; + $from = $this->normalizeCurrency($from, $this->defaultReportCurrency); + $to = $this->normalizeCurrency($to, $this->defaultReportCurrency); if ($from === $to) { return $amount; } @@ -355,4 +355,10 @@ final class HomePage return null; } } + + private function normalizeCurrency(?string $value, string $fallback = 'EUR'): string + { + $normalized = strtoupper(trim((string) $value)); + return $normalized !== '' ? $normalized : $fallback; + } }