From bb22703dcaa53400c17674b8bb7ba1cf76dffac8 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 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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. Tested scripts changed by this patch, they work as expected. Signed-off-by: Marc Véron Signed-off-by: Nick Clemens Signed-off-by: Jonathan Druart Signed-off-by: Jonathan Druart --- members/memberentry.pl | 2 +- members/pay.pl | 4 ++-- opac/opac-user.pl | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/members/memberentry.pl b/members/memberentry.pl index 8672a20030..2ffea5de4c 100755 --- a/members/memberentry.pl +++ b/members/memberentry.pl @@ -755,7 +755,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/pay.pl b/members/pay.pl index 2e25eef2c5..3400ee0667 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, @@ -208,7 +208,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 00e5a97f62..395b148bac 100755 --- a/opac/opac-user.pl +++ b/opac/opac-user.pl @@ -344,7 +344,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.39.5