From ad0a2efb415ab4a69bce97f6f47b3fd68f36a3fe Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 18 Apr 2017 13:50:36 -0300 Subject: [PATCH] Bug 18179: Update existing calls This patch updates the existing occurrences of ->find called in a list context. There are certainly others that are not easy to catch with git grep. Test plan: Confirm that the 4 modified scripts still works as expected. We need this one ASAP in master to make sure we will not get other side-effects of this kind and to catch possible uncaught occurrences before the release. --- members/memberentry.pl | 2 +- members/moremember.pl | 2 +- members/pay.pl | 4 ++-- opac/opac-user.pl | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/members/memberentry.pl b/members/memberentry.pl index 768b163..c13faa5 100755 --- a/members/memberentry.pl +++ b/members/memberentry.pl @@ -753,7 +753,7 @@ $template->param( csrf_token => # HouseboundModule data $template->param( - housebound_role => Koha::Patron::HouseboundRoles->find($borrowernumber), + housebound_role => scalar Koha::Patron::HouseboundRoles->find($borrowernumber), ); if(defined($data{'flags'})){ diff --git a/members/moremember.pl b/members/moremember.pl index 7bea08da..5386c9b 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'}, activeBorrowerRelationship => (C4::Context->preference('borrowerRelationship') ne ''), AutoResumeSuspendedHolds => C4::Context->preference('AutoResumeSuspendedHolds'), diff --git a/members/pay.pl b/members/pay.pl index 7e008d4..8555968 100755 --- a/members/pay.pl +++ b/members/pay.pl @@ -94,7 +94,7 @@ if ($writeoff_all) { Koha::Account->new( { patron_id => $borrowernumber } )->pay( { amount => $amount, - lines => [Koha::Account::Lines->find($accountlines_id)], + lines => [ scalar Koha::Account::Lines->find($accountlines_id) ], type => 'writeoff', note => $payment_note, library_id => $branch, @@ -209,7 +209,7 @@ sub writeoff_all { Koha::Account->new( { patron_id => $borrowernumber } )->pay( { amount => $amount, - lines => [ Koha::Account::Lines->find($accountlines_id) ], + lines => [ scalar Koha::Account::Lines->find($accountlines_id) ], type => 'writeoff', note => $payment_note, library_id => $branch, diff --git a/opac/opac-user.pl b/opac/opac-user.pl index c7333e2..d16ba99 100755 --- a/opac/opac-user.pl +++ b/opac/opac-user.pl @@ -337,7 +337,7 @@ if ( C4::Context->preference('AllowPatronToSetCheckoutsVisibilityForGuarantor' } $template->param( - borrower => Koha::Patrons->find($borrowernumber), + borrower => scalar Koha::Patrons->find($borrowernumber), patron_messages => $patron_messages, opacnote => $borr->{opacnote}, patronupdate => $patronupdate, -- 2.1.4