From 49253ace12e6cd1350680f3b9b3ee3f904067767 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Fri, 19 May 2017 12:22:03 +0200 Subject: [PATCH] Bug 18552: [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: Kyle M Hall --- members/moremember.pl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/members/moremember.pl b/members/moremember.pl index 0027099fe1..0e18d2234f 100755 --- a/members/moremember.pl +++ b/members/moremember.pl @@ -343,6 +343,7 @@ my $translated_language = C4::Languages::language_get_description( $subtag, $sub $template->param( patron => $patron, + borrower => $patron, # TODO Still needed by includes, translated_language => $translated_language, detailview => 1, borrowernumber => $borrowernumber, @@ -354,11 +355,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'), @@ -366,7 +367,6 @@ $template->param( PatronsPerPage => C4::Context->preference("PatronsPerPage") || 20, relatives_issues_count => $relatives_issues_count, relatives_borrowernumbers => \@relatives, - borrower => Koha::Patrons->find( $borrowernumber ), ); output_html_with_http_headers $input, $cookie, $template->output; -- 2.39.5