summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2010-10-31 16:00:28 +0100
committerYorhel <git@yorhel.nl>2010-10-31 16:00:28 +0100
commit0582b57798426b8e3820a745496900c856fb6286 (patch)
tree4776ea75089142071c15baa00bda550dbf97bc71
parent25aa82f5e15115e58d91ecb09d5f0da75ccba354 (diff)
Multi::Anime: don't crash when anidb returns an invalid or empty year
Like as with Steins;Gate, where the year isn't known.
-rw-r--r--ChangeLog1
-rw-r--r--lib/Multi/Anime.pm2
2 files changed, 2 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 807c300e..3f9cb586 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,6 +7,7 @@
- Display friendly message in the VN edit scr tab when no release is known
- Bugfix: only redirect VN search to VN page if page=1
- Bugfix: remove duplicate votes when merging tags (fixes a 500)
+ - Bugfix: Multi::Anime: don't crash when anidb returns an invalid or empty year
2.11 - 2010-02-06
- Added Slovak to the language list
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];