Bugzilla – Attachment 47602 Details for
Bug 15730
500 error on returns.pl if barcode doesn't exist
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15730 - 500 error on returns.pl if barcode doesn't exist
Bug-15730---500-error-on-returnspl-if-barcode-does.patch (text/plain), 1.61 KB, created by
Kyle M Hall (khall)
on 2016-02-03 15:59:43 UTC
(
hide
)
Description:
Bug 15730 - 500 error on returns.pl if barcode doesn't exist
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2016-02-03 15:59:43 UTC
Size:
1.61 KB
patch
obsolete
>From 6e098d6efd040396a9dc767d3727149975d2cade Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Wed, 3 Feb 2016 15:10:30 +0000 >Subject: [PATCH] Bug 15730 - 500 error on returns.pl if barcode doesn't exist > >If a librarian enters a barcode that does not match an item in the >database, a 500 error will be displayed instead of the "No item with >barcode" message. > >Test Plan: >1) Enter an invalid barcode on returns.pl >2) Note the 500 error >3) Apply this patch >4) Repeat setp 1 >5) Note the "No item with barcode" message >--- > circ/returns.pl | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/circ/returns.pl b/circ/returns.pl >index 8ff9350..162039d 100755 >--- a/circ/returns.pl >+++ b/circ/returns.pl >@@ -266,7 +266,7 @@ if ($barcode) { > # Check if we should display a checkin message, based on the the item > # type of the checked in item > my $itemtype = Koha::ItemTypes->find( $biblio->{'itemtype'} ); >- if ( $itemtype->checkinmsg ) { >+ if ( $itemtype && $itemtype->checkinmsg ) { > $template->param( > checkinmsg => $itemtype->checkinmsg, > checkinmsgtype => $itemtype->checkinmsgtype, >@@ -274,7 +274,7 @@ if ($barcode) { > } > > # make sure return branch respects home branch circulation rules, default to homebranch >- my $hbr = GetBranchItemRule($biblio->{'homebranch'}, $itemtype->itemtype)->{'returnbranch'} || "homebranch"; >+ my $hbr = GetBranchItemRule($biblio->{'homebranch'}, $itemtype ? $itemtype->itemtype : undef )->{'returnbranch'} || "homebranch"; > my $returnbranch = $biblio->{$hbr} ; > > $template->param( >-- >2.1.4
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 15730
:
47602
|
47629
|
47637