[Koha-bugs] [Bug 17979] Fatal error when searching from addbooks.pl due to ISBN flaw

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Nov 22 23:45:39 CET 2019


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17979

Katrin Fischer <katrin.fischer at bsz-bw.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |katrin.fischer at bsz-bw.de
             Status|Needs Signoff               |Failed QA

--- Comment #4 from Katrin Fischer <katrin.fischer at bsz-bw.de> ---
Hi Owen,

why not search the ISBN as is? Or in different formats according to our ISBN
variations prefs? I am not sure about the line using the as_isbn10.

+    if( $isbn = Business::ISBN->new( $query ) ) {
+        $isbn = $isbn->as_isbn10->as_string;
+        $isbn =~ s/-//g;

As I understand it, if the ISBN is a new one (13), this will return undef.

as_isbn10

    Returns a new ISBN object. If the object is already ISBN-10, this method
clones it. If it is an ISBN-13 with the prefix 978, it returns the ISBN-10
equivalent. For all other cases it returns undef.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list