Bugzilla – Attachment 63832 Details for
Bug 18179
Koha::Objects->find should not be called in list context
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[16.11.x] Bug 18179: Update existing calls
Bug-18179-Update-existing-calls.patch (text/plain), 2.69 KB, created by
Jonathan Druart
on 2017-05-29 18:10:04 UTC
(
hide
)
Description:
[16.11.x] Bug 18179: Update existing calls
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2017-05-29 18:10:04 UTC
Size:
2.69 KB
patch
obsolete
>From 03dfb30d402d4d18fec6ccb01d97bdcde41798bb Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >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=UTF-8 >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 <veron@veron.ch> > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > members/memberentry.pl | 2 +- > members/moremember.pl | 2 +- > opac/opac-user.pl | 2 +- > 3 files changed, 3 insertions(+), 3 deletions(-) > >diff --git a/members/memberentry.pl b/members/memberentry.pl >index 068da734e2..49f3855af8 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 98356f4867..f526aa53b8 100755 >--- a/members/moremember.pl >+++ b/members/moremember.pl >@@ -336,7 +336,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'), >diff --git a/opac/opac-user.pl b/opac/opac-user.pl >index 05f283b95f..3e7aabfc0e 100755 >--- a/opac/opac-user.pl >+++ b/opac/opac-user.pl >@@ -330,7 +330,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.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 18179
:
62216
|
62218
|
62304
|
62305
|
62319
|
62321
|
62656
|
62657
|
62879
|
62880
|
63106
|
63107
|
63108
|
63109
| 63832