From 365658d7274f13760b638673bf1ee293409387ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Fromme?= Date: Wed, 7 Jan 2026 20:00:51 +0100 Subject: [PATCH] fix: allow null argument for gender mapping --- src/Twig/AppRuntime.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Twig/AppRuntime.php b/src/Twig/AppRuntime.php index 9269e88..e0cc9c0 100644 --- a/src/Twig/AppRuntime.php +++ b/src/Twig/AppRuntime.php @@ -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); return match ($gender) {