Bugzilla – Attachment 60647 Details for
Bug 18022
Empty barcode causes internal server error
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18022: Fix possible crash if CircAutoPrintQuickSlip=clear screen
Bug-18022-Fix-possible-crash-if-CircAutoPrintQuick.patch (text/plain), 1.82 KB, created by
Jonathan Druart
on 2017-02-24 11:02:06 UTC
(
hide
)
Description:
Bug 18022: Fix possible crash if CircAutoPrintQuickSlip=clear screen
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2017-02-24 11:02:06 UTC
Size:
1.82 KB
patch
obsolete
>From 7aabcef216707dd2b18166797149f923a389f7f7 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 24 Feb 2017 11:44:23 +0100 >Subject: [PATCH] Bug 18022: Fix possible crash if CircAutoPrintQuickSlip=clear > screen > >If CircAutoPrintQuickSlip is set to clear screen, the $borrowernumber variable >is reset but $borrower. >In 16.11.x and before that causes the app to crash, because >$borrower->{flags} is set to a hashref by GetMemberDetails, if >$borrowernumber is set. > >This case is better handled in master (17.05) but side-effects could >happen: if $borrowernumber is reset, $borrower should be reset too. > >The way to drive this behaviour is terrible and lot of things should be >done to clean this area. This patch is a quick and easy fix to make it >backportable easily. > >Test plan: >On master, no change expected >On 16.11 and before: >0. Set CircAutoPrintQuickSlip=clear screen >1. Create a new patron >2. Set permission for this patron to 'reservesforothers' (or something >else). >3. Go on the circulation tab >4. Do not fill the barcode input and submit >=> Without this patch you will get an error >Can't use string ("64") as a HASH ref while "strict refs".... >=> With this patch apply you will get a blank screen (expected >behaviour). > >I would recommend to test this patch with the other value of >CircAutoPrintQuickSlip as well >--- > circ/circulation.pl | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > >diff --git a/circ/circulation.pl b/circ/circulation.pl >index 5db1001..e7bba63 100755 >--- a/circ/circulation.pl >+++ b/circ/circulation.pl >@@ -221,7 +221,8 @@ if ( $print eq 'yes' && $borrowernumber ne '' ) { > NetworkPrint($letter->{content}); > } > $query->param( 'borrowernumber', '' ); >- $borrowernumber = ''; >+ $borrowernumber = ''; # FIXME This is terrible >+ $borrower = {}; > } > > # >-- >2.9.3
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 18022
: 60647