Bug 18492 - moremember.pl template param without key
Summary: moremember.pl template param without key
Status: RESOLVED DUPLICATE of bug 18179
Alias: None
Product: Koha
Classification: Unclassified
Component: Staff interface (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low major (vote)
Assignee: Lari Taskula
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-04-25 12:11 UTC by Lari Taskula
Modified: 2017-04-25 13:32 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 18492: moremember.pl template param without key (1.85 KB, patch)
2017-04-25 12:19 UTC, Lari Taskula
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 18492: moremember.pl template param without key (1.91 KB, patch)
2017-04-25 13:06 UTC, Owen Leonard
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Lari Taskula 2017-04-25 12:11:48 UTC
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"
Comment 1 Lari Taskula 2017-04-25 12:19:25 UTC
Created attachment 62660 [details] [review]
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
Comment 2 Lari Taskula 2017-04-25 12:25:15 UTC
Increasing importance of Bug as I cannot see relatives' checkouts tab without this patch.
Comment 3 Owen Leonard 2017-04-25 13:06:15 UTC
Created attachment 62665 [details] [review]
[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 <oleonard@myacpl.org>
Comment 4 Jonathan Druart 2017-04-25 13:32:38 UTC

*** This bug has been marked as a duplicate of bug 18179 ***