From 21d8f726fa205b4b31f9a3b7f17227688a6b3449 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Fri, 19 May 2017 12:22:03 +0200 Subject: [PATCH] Bug 18552: [16.11.X] [QA Follow-up] Resolve warnings Like: Problem = a value of AutoResumeSuspendedHolds has been passed to param without key at /usr/share/koha/masterclone/C4/Templates.pm line 137. Problem = a value of relatives_borrowernumbers has been passed to param without key at /usr/share/koha/masterclone/C4/Templates.pm line 137. Problem is functions returning undef in list context (in this case housebound_role). No need to call Patrons::find a second time. Note: The call of GetDebarments in the first patch suffered from this too. It is in a fine place now too. But strictly speaking, should not have been moved. Signed-off-by: Marcel de Rooy Signed-off-by: Katrin Fischer --- members/moremember.pl | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/members/moremember.pl b/members/moremember.pl index 2d996efc30..df9f0d2729 100755 --- a/members/moremember.pl +++ b/members/moremember.pl @@ -326,6 +326,7 @@ if (C4::Context->preference('EnhancedMessagingPreferences')) { $template->param( $data->{'categorycode'} => 1 ); $template->param( patron => $patron, + borrower => $patron, # TODO Still needed by includes, detailview => 1, borrowernumber => $borrowernumber, othernames => $data->{'othernames'}, @@ -336,11 +337,11 @@ $template->param( totaldue => sprintf("%.2f", $total), totaldue_raw => $total, overdues_exist => $overdues_exist, - StaffMember => ($category_type eq 'S'), - is_child => ($category_type eq 'C'), + StaffMember => $category_type eq 'S', + is_child => $category_type eq 'C', samebranch => $samebranch, quickslip => $quickslip, - housebound_role => $patron->housebound_role, + housebound_role => scalar $patron->housebound_role, privacy_guarantor_checkouts => $data->{'privacy_guarantor_checkouts'}, AutoResumeSuspendedHolds => C4::Context->preference('AutoResumeSuspendedHolds'), SuspendHoldsIntranet => C4::Context->preference('SuspendHoldsIntranet'), -- 2.39.2