Commit 8f641612 authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

handle undef HAFAS::Result->info value

parent 4f0d789e
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -438,8 +438,13 @@ sub handle_request {
				$moreinfo = [ [ 'HAFAS', $info ] ];
			}
			if ( $result->delay and $result->delay > 0 ) {
				if ($info) {
					$info = 'ca. +' . $result->delay . ': ' . $info;
				}
				else {
					$info = 'ca. +' . $result->delay;
				}
			}
			push( @{$moreinfo}, map { [ 'HAFAS', $_ ] } $result->messages );
		}

@@ -465,9 +470,6 @@ sub handle_request {
			}
		}

		if ( $info eq '+0' ) {
			$info = undef;
		}
		if (    $template eq 'clean'
			and $info
			and $info =~ s{ (?: ca \. \s* )? \+ (\d+) :? \s* }{}x )