From 4b8856ff35c40600b4f8ae7b276b8c399c6d16ed Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Sat, 16 Sep 2023 15:03:50 +0200 Subject: journey: check if nameS exists before concatenating it --- lib/Travel/Status/DE/HAFAS/Journey.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Travel/Status/DE/HAFAS/Journey.pm b/lib/Travel/Status/DE/HAFAS/Journey.pm index fcb33d4..6b9af6d 100644 --- a/lib/Travel/Status/DE/HAFAS/Journey.pm +++ b/lib/Travel/Status/DE/HAFAS/Journey.pm @@ -53,7 +53,7 @@ sub new { my $train_no = $product->{prodCtx}{num}; my $cat = $product->{prodCtx}{catOut}; my $catlong = $product->{prodCtx}{catOutL}; - if ( $name and $cat and $name eq $cat ) { + if ( $name and $cat and $name eq $cat and $product->{nameS} ) { $name .= ' ' . $product->{nameS}; } if ( defined $train_no and not $train_no ) { -- cgit v1.2.3