[Koha-patches] [PATCH] Bug 4305 - prevent errors when handling invalid ISBN13 values
Chris Cormack
chrisc at catalyst.net.nz
Wed Oct 20 09:13:15 CEST 2010
From: Robin Sheat <robin at catalyst.net.nz>
Signed-off-by: Chris Cormack <chrisc at catalyst.net.nz>
---
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.0.4
More information about the Koha-patches
mailing list