From 0c6ebc5ece61f7c71323f415d78cfb2d24b33d24 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Fri, 8 Feb 2019 10:37:50 +0000 Subject: [PATCH] Bug 22294: Check return of as_isbn10 before calling methods on it Signed-off-by: Brendan Gallagher Signed-off-by: Kyle M Hall --- Koha/EDI.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Koha/EDI.pm b/Koha/EDI.pm index 4e730de286..54edf00aa7 100644 --- a/Koha/EDI.pm +++ b/Koha/EDI.pm @@ -898,7 +898,7 @@ sub _check_for_existing_bib { $isbn =~ s/\-//xmsg; if ( $isbn =~ m/(\d{13})/xms ) { my $b_isbn = Business::ISBN->new($1); - if ( $b_isbn && $b_isbn->is_valid ) { + if ( $b_isbn && $b_isbn->is_valid && $b_isbn->as_isbn10 ) { $search_isbn = $b_isbn->as_isbn10->as_string( [] ); } -- 2.21.0 (Apple Git-122)