From e81bc5ce81c594e71379df1168fd99d4062cea4f Mon Sep 17 00:00:00 2001 From: Robin Sheat Date: Wed, 20 Oct 2010 20:13:15 +1300 Subject: [PATCH] Bug 4305 - prevent errors when handling invalid ISBN13 values Signed-off-by: Chris Cormack Signed-off-by: Galen Charlton --- C4/Koha.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/C4/Koha.pm b/C4/Koha.pm index ab9131a9fb..dc2bcfa83b 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; -- 2.39.5