Bug 22294: Check return of as_isbn10 before calling methods on it

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Martin Renvoize 2019-02-08 10:37:50 +00:00
parent d66432cafd
commit b604e9c4fc
No known key found for this signature in database
GPG Key ID: 422B469130441A0F
1 changed files with 1 additions and 1 deletions

View File

@ -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( [] );
}