[Koha-bugs] [Bug 20829] 'Link to host item' gives internal server error

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed May 30 17:14:07 CEST 2018


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

--- Comment #4 from Jonathan Druart <jonathan.druart at bugs.koha-community.org> ---
Created attachment 75671
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=75671&action=edit
Bug 20829: Handle non-existent barcode when linking to host item

Since commit 2c9aeb9b0f4449d1a25274b8fbf8dae4ec11d3bf
  Bug 18277: Remove GetBiblionumberFromItemnumber - linkitem

$item is not defined if the barcode is invalid, we should not call
method on it in that case.

Test plan:
- Turn on EasyAnalyticalRecords
- Go to a detail page
- Edit > Link to host item
- Enter an invalid barcode
=> With the patch you get a friendly error message
=> Without this patch it explodes with
Can't call method "itemnumber" on an undefined value at
/home/vagrant/kohaclone/cataloguing/linkitem.pl line 86.

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


More information about the Koha-bugs mailing list