From 0582b57798426b8e3820a745496900c856fb6286 Mon Sep 17 00:00:00 2001 From: Yorhel Date: Sun, 31 Oct 2010 16:00:28 +0100 Subject: Multi::Anime: don't crash when anidb returns an invalid or empty year Like as with Steins;Gate, where the year isn't known. --- lib/Multi/Anime.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/Multi/Anime.pm') diff --git a/lib/Multi/Anime.pm b/lib/Multi/Anime.pm index 05852e49..dd32782d 100644 --- a/lib/Multi/Anime.pm +++ b/lib/Multi/Anime.pm @@ -230,7 +230,7 @@ sub receivepacket { # input, wheelid } $col[1] = undef if !$col[1]; $col[2] = undef if !$col[2] || $col[2] =~ /^0,/; - $col[3] = $1 if $col[3] =~ /^([0-9]+)/; # remove multi-year stuff + $col[3] = $col[3] =~ /^([0-9]+)/ ? $1 : undef; $col[3] = undef if !$col[3]; $col[4] = $_[HEAP]{anime_types}{ lc($col[4]) }; $col[5] = undef if !$col[5]; -- cgit v1.2.3