fix: allow null argument for gender mapping

This commit is contained in:
Björn Fromme
2026-03-16 12:02:27 +01:00
parent ff241f437f
commit 00304facba
+5 -1
View File
@@ -95,8 +95,12 @@ class AppRuntime implements RuntimeExtensionInterface
}; };
} }
public function mapGender(string $gender): string public function mapGender(?string $gender): string
{ {
if (null === $gender) {
return '';
}
$gender = strtoupper($gender); $gender = strtoupper($gender);
return match ($gender) { return match ($gender) {