This patch adjusts the test so that if an "ISBN" is not
defined (because the source string did not specify a valid
ISBN), it doesn't result in a warning once the warnings
stricture is enabled in C4::Koha.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
push( @isbns, NormalizeISBN({ isbn => $isbn, format => 'ISBN-13', strip_hyphens => 1 }) );
# Strip out any "empty" strings from the array
- @isbns = grep { /\S/ } @isbns;
+ @isbns = grep { defined($_) && $_ =~ /\S/ } @isbns;
return wantarray ? @isbns : join( " | ", @isbns );
}