summaryrefslogtreecommitdiff
path: root/lib/Travel/Status/DE/DBRIS
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Travel/Status/DE/DBRIS')
-rw-r--r--lib/Travel/Status/DE/DBRIS/Journey.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Travel/Status/DE/DBRIS/Journey.pm b/lib/Travel/Status/DE/DBRIS/Journey.pm
index 4bb8f37..b3eff4c 100644
--- a/lib/Travel/Status/DE/DBRIS/Journey.pm
+++ b/lib/Travel/Status/DE/DBRIS/Journey.pm
@@ -32,7 +32,9 @@ sub new {
# Number is either train no (ICE, RE) or line no (S, U, Bus, ...)
# with no way of distinguishing between those
- ( $ref->{type}, $ref->{number} ) = split( qr{\s+}, $ref->{train} );
+ if ( $ref->{train} ) {
+ ( $ref->{type}, $ref->{number} ) = split( qr{\s+}, $ref->{train} );
+ }
# The line number seems to be encoded in the trip ID
if ( not defined $ref->{number}