Fix: Make country name filter failure tolerant
This commit is contained in:
@@ -32,8 +32,12 @@ class CountryDataProvider
|
|||||||
return $countries;
|
return $countries;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function get(string $token): ?Country
|
public function get(?string $token): ?Country
|
||||||
{
|
{
|
||||||
|
if (null === $token) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
return $this->getAll()[$token] ?? null;
|
return $this->getAll()[$token] ?? null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -36,7 +36,7 @@ class AppRuntime implements RuntimeExtensionInterface
|
|||||||
return sprintf('Offizielle %slehrer*innenlizenz', ucfirst(strtolower($type)));
|
return sprintf('Offizielle %slehrer*innenlizenz', ucfirst(strtolower($type)));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function bpnCountryLabel(string $token, string $property = 'name'): string
|
public function bpnCountryLabel(?string $token, string $property = 'name'): string
|
||||||
{
|
{
|
||||||
$country = $this->countries->get($token);
|
$country = $this->countries->get($token);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user