From 4afedcdb2071f3310f68e528cf7613336fb7c3bd Mon Sep 17 00:00:00 2001 From: Lari Taskula Date: Tue, 25 Apr 2017 12:12:05 +0000 Subject: [PATCH] [SIGNED-OFF] Bug 18492: moremember.pl template param without key moremember.pl has a template parameter without a key bug after Bug 5670. I noticed this when working with Relatives checkouts tab, which was oddly missing even though the guarantee had checkouts. Also I get this warning in my logs: Problem = a value of activeBorrowerRelationship has been passed to param without key at /home/koha/kohaclone/C4/Templates.pm line 137. The issue is at the end of moremember.pl, in $template->param( ... housebound_role => $patron->housebound_role, ... ); $patron->housebound_role seems to return an empty list instead of undef in scalar context. To replicate: 1. Ensure patron is not associated with a HouseboundRole 2. Go to patron's details tab 3. See your error log, it should have a warning "Problem = a value of activeBorrowerRelationship has been passed to param without key" To test: 1. Apply patch 2. Perform the steps at "To replicate" plan 3. Observe there are no longer warnings Signed-off-by: Owen Leonard --- members/moremember.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/members/moremember.pl b/members/moremember.pl index 4f88862..9d76d76 100755 --- a/members/moremember.pl +++ b/members/moremember.pl @@ -346,7 +346,7 @@ $template->param( 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.1.4