diff options
| author | Daniel Friesel <derf@finalrewind.org> | 2015-09-20 13:05:51 +0200 | 
|---|---|---|
| committer | Daniel Friesel <derf@finalrewind.org> | 2015-09-20 13:05:51 +0200 | 
| commit | 8f6416123a3fd0975ab5c441c80a7afcd587298b (patch) | |
| tree | 2d5aeee1089f9ad98a079381ad3fa4896f7d0111 | |
| parent | 4f0d789e19187b75ca03c6b17eee84aece2e1f47 (diff) | |
handle undef HAFAS::Result->info value
| -rw-r--r-- | index.pl | 10 | 
1 files changed, 6 insertions, 4 deletions
| @@ -438,7 +438,12 @@ sub handle_request {  				$moreinfo = [ [ 'HAFAS', $info ] ];  			}  			if ( $result->delay and $result->delay > 0 ) { -				$info = 'ca. +' . $result->delay . ': ' . $info; +				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 ) | 
