From f7deac35786b3bf799f40cb563f440b23d5da716 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sun, 5 Feb 2023 09:16:15 +0100 Subject: Journey: some backends do not provide catOut --- lib/Travel/Status/DE/HAFAS/Journey.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/Travel') diff --git a/lib/Travel/Status/DE/HAFAS/Journey.pm b/lib/Travel/Status/DE/HAFAS/Journey.pm index f3c1c28..94052ed 100644 --- a/lib/Travel/Status/DE/HAFAS/Journey.pm +++ b/lib/Travel/Status/DE/HAFAS/Journey.pm @@ -50,7 +50,7 @@ sub new { my $train_no = $product->{prodCtx}{num}; my $cat = $product->{prodCtx}{catOut}; my $catlong = $product->{prodCtx}{catOutL}; - if ( $name eq $cat ) { + if ( $name and $cat and $name eq $cat ) { $name .= ' ' . $product->{nameS}; } if ( defined $train_no and not $train_no ) { -- cgit v1.2.3