Bugzilla – Attachment 75671 Details for
Bug 20829
'Link to host item' gives internal server error
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20829: Handle non-existent barcode when linking to host item
Bug-20829-Handle-non-existent-barcode-when-linking.patch (text/plain), 1.44 KB, created by
Jonathan Druart
on 2018-05-30 15:14:07 UTC
(
hide
)
Description:
Bug 20829: Handle non-existent barcode when linking to host item
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2018-05-30 15:14:07 UTC
Size:
1.44 KB
patch
obsolete
>From 55737996ccaf02359ac9480bd43cbc9c38c354c3 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 30 May 2018 12:10:58 -0300 >Subject: [PATCH] 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. >--- > cataloguing/linkitem.pl | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > >diff --git a/cataloguing/linkitem.pl b/cataloguing/linkitem.pl >index 40e2a98898..4ea4727559 100755 >--- a/cataloguing/linkitem.pl >+++ b/cataloguing/linkitem.pl >@@ -75,6 +75,9 @@ if ( $barcode && $biblionumber ) { > errornomodbiblio => 1 > ); > } >+ $template->param( >+ hostitemnumber => $item->itemnumber, >+ ); > } > else { > $template->param( >@@ -85,7 +88,6 @@ if ( $barcode && $biblionumber ) { > > $template->param( > barcode => $barcode, >- hostitemnumber => $item->itemnumber, > ); > > } >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 20829
:
75671
|
75696