asdsad
All checks were successful
Deploy / deploy-staging (push) Successful in 6s
Deploy / deploy-production (push) Has been skipped

This commit is contained in:
2026-05-03 01:02:54 +02:00
parent 7f038f03e8
commit fa424957b6

View File

@@ -341,8 +341,8 @@ final class HomePage
return null; return null;
} }
$from = strtoupper(trim($from)) ?: $this->defaultReportCurrency; $from = $this->normalizeCurrency($from, $this->defaultReportCurrency);
$to = strtoupper(trim($to)) ?: $this->defaultReportCurrency; $to = $this->normalizeCurrency($to, $this->defaultReportCurrency);
if ($from === $to) { if ($from === $to) {
return $amount; return $amount;
} }
@@ -355,4 +355,10 @@ final class HomePage
return null; return null;
} }
} }
private function normalizeCurrency(?string $value, string $fallback = 'EUR'): string
{
$normalized = strtoupper(trim((string) $value));
return $normalized !== '' ? $normalized : $fallback;
}
} }