fix uninitialized value warning when handling odd trains (trains without type)

This commit is contained in:
Daniel Friesel 2020-02-01 10:59:46 +01:00
parent aa7a7db2bc
commit a29568711f

View file

@ -2302,8 +2302,11 @@ sub startup {
{ {
# Drunken API, sail with care. Both date formats are used interchangeably # Drunken API, sail with care. Both date formats are used interchangeably
if ( $suggestion->{depDate} eq $date_yy if (
$suggestion->{depDate}
and ( $suggestion->{depDate} eq $date_yy
or $suggestion->{depDate} eq $date_yyyy ) or $suggestion->{depDate} eq $date_yyyy )
)
{ {
# Train numbers are not unique, e.g. IC 149 refers both to the # Train numbers are not unique, e.g. IC 149 refers both to the
# InterCity service Amsterdam -> Berlin and to the InterCity service # InterCity service Amsterdam -> Berlin and to the InterCity service