fix: prevent null pointer exception
This commit is contained in:
@@ -50,8 +50,12 @@ class AppRuntime implements RuntimeExtensionInterface
|
|||||||
return 'nationality' === $property ? $country->getNationality() : $country->getName();
|
return 'nationality' === $property ? $country->getNationality() : $country->getName();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function bpnPickupLabel(int $id): string
|
public function bpnPickupLabel(?int $id): string
|
||||||
{
|
{
|
||||||
|
if (null === $id) {
|
||||||
|
return 'keine Busbegleitung';
|
||||||
|
}
|
||||||
|
|
||||||
$pickup = $this->pickups->get($id);
|
$pickup = $this->pickups->get($id);
|
||||||
|
|
||||||
if (null === $pickup) {
|
if (null === $pickup) {
|
||||||
|
|||||||
Reference in New Issue
Block a user