Bugzilla – Attachment 68288 Details for
Bug 19493
Remove few warnings from circulation.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19493: Remove few warnings from circulation.pl
Bug-19493-Remove-few-warnings-from-circulationpl.patch (text/plain), 2.75 KB, created by
Marcel de Rooy
on 2017-10-19 07:47:15 UTC
(
hide
)
Description:
Bug 19493: Remove few warnings from circulation.pl
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2017-10-19 07:47:15 UTC
Size:
2.75 KB
patch
obsolete
>From 1928b06171e75d2fd6bd9240de803b6d8b0f2d37 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Wed, 18 Oct 2017 16:03:57 +0200 >Subject: [PATCH] Bug 19493: Remove few warnings from circulation.pl >Content-Type: text/plain; charset=utf-8 > >If you click Submit on the staff home page without entering a cardnumber, you will find these warnings in the log: >Problem = a value of override_high_holds has been passed to param without key at /usr/share/koha/masterclone/C4/Templates.pm line 137. >Problem = a value of nopermission has been passed to param without key at /usr/share/koha/masterclone/C4/Templates.pm line 137. >Use of uninitialized value $val in concatenation (.) or string at /usr/share/koha/masterclone/C4/Templates.pm line 137. >Problem = a value of has been passed to param without key at /usr/share/koha/masterclone/C4/Templates.pm line 137. > >Cause is this call to $template->param: >$template->param( > CircAutocompl => C4::Context->preference("CircAutocompl"), > debarments => GetDebarments({ borrowernumber => $borrowernumber }), > todaysdate => output_pref( { dt => dt_from_string()->set(hour => 23)->set(minute => 59), dateformat => 'sql' } ), > has_modifications => $has_modifications, > override_high_holds => $override_high_holds, > nopermission => scalar $query->param('nopermission'), > >In this specific case GetDebarments returns undef in list context (empty list), >so all items in the list shift one place. >Either we should force GetDebarments to return []; or we force scalar context in a construction like this. This patch does the last thing. > >Note: The calls in memberentry.pl and moremember.pl are not affected. > >Test plan: >[1] Do not apply. Click Submit without cardnumber. Check the log. >[2] Apply. Click Submit again without cardnumber. Check log. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > circ/circulation.pl | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/circ/circulation.pl b/circ/circulation.pl >index 130d350..7a73561 100755 >--- a/circ/circulation.pl >+++ b/circ/circulation.pl >@@ -652,7 +652,7 @@ $template->param( > debt_confirmed => $debt_confirmed, > SpecifyDueDate => $duedatespec_allow, > CircAutocompl => C4::Context->preference("CircAutocompl"), >- debarments => GetDebarments({ borrowernumber => $borrowernumber }), >+ debarments => scalar GetDebarments({ borrowernumber => $borrowernumber }), > todaysdate => output_pref( { dt => dt_from_string()->set(hour => 23)->set(minute => 59), dateformat => 'sql' } ), > has_modifications => $has_modifications, > override_high_holds => $override_high_holds, >-- >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 19493
:
68288
|
68599
|
68755