https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10756
Mason James <m...@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #51177|0 |1 is obsolete| | --- Comment #15 from Mason James <m...@kohaaloha.com> --- Created attachment 51187 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=51187&action=edit Bug 10756 - Carousel Display - Followup On first testing this I got a 500 error saying "Can't call method "is_valid" on an undefined value at /home/magnus/scripts/kohaclone/Koha/Carousel.pm line 128." This was caused by a record with an ISBN of "979-10-91414-01-2". The relevant code looks like this: my $isbn_obj = Business::ISBN->new($ii); my $isbn10; $isbn10 = $isbn_obj->as_isbn10; if ( $isbn10->is_valid() ) {...} The documentation for Business::ISBN::as_isbn10 says: "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." So for an ISBN that starts with 979 like mine did, $isbn10 will be undef and we need to do some extra checking before is_valid(). To test: - Apply the first two patches on this bug and follow their test plan - Make sure you have a new record with an ISBN that starts with 979 - Refresh the front page and observe the error - Apply this patch - Refresh the front page again and notice the absence of the error Signed-off-by: Mason James <m...@kohaaloha.com> -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/