From d96162404ef487f26aef96fb9a361c67941858fe Mon Sep 17 00:00:00 2001 From: Robin Sheat Date: Wed, 20 Oct 2010 19:25:24 +1300 Subject: [PATCH] Bug 4305 - prevent errors when handling invalid ISBN13 values --- C4/Koha.pm | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/C4/Koha.pm b/C4/Koha.pm index ab9131a..dc2bcfa 100644 --- a/C4/Koha.pm +++ b/C4/Koha.pm @@ -1330,6 +1330,7 @@ sub _isbn_cleanup ($) { my $isbn = Business::ISBN->new( shift ); return undef unless $isbn; $isbn = $isbn->as_isbn10 if $isbn->type eq 'ISBN13'; + return undef unless $isbn; $isbn = $isbn->as_string; $isbn =~ s/-//g; return $isbn; -- 1.7.1