Bugzilla – Attachment 66895 Details for
Bug 19214
Patron clubs: Template process failed: undef error - Cannot use "->find" in list context
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19214: Prevent error for patron clubs
Bug-19214-Prevent-error-for-patron-clubs.patch (text/plain), 1.65 KB, created by
Mark Tompsett
on 2017-09-06 17:11:20 UTC
(
hide
)
Description:
Bug 19214: Prevent error for patron clubs
Filename:
MIME Type:
Creator:
Mark Tompsett
Created:
2017-09-06 17:11:20 UTC
Size:
1.65 KB
patch
obsolete
>From 320a6d7b5d6d5531c6e8a52faebd281c02fa6a5e Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleishaamohia@hotmail.com> >Date: Wed, 30 Aug 2017 23:54:56 +0000 >Subject: [PATCH] Bug 19214: Prevent error for patron clubs > >To test: >1) Create a club template and a club. >2) Add a user to the club >3) Log in to the OPAC as that user >4) Go to 'your summary' and click the Clubs tab >5) Notice clubs do not load and a warn shows: >Template process failed: undef error - Cannot use "->find" in list >context at /home/vagrant/kohaclone/Koha/Club/Enrollment.pm line 62. >6) Go to the staff side and go to the member page of that user >7) Go to 'details' and click the Clubs tab >8) Notice clubs do not load and a warn shows: >Template process failed: undef error - Cannot use "->find" in list >context at /home/vagrant/kohaclone/Koha/Club/Enrollment.pm line 71. >9) Apply patch >1) Repeat steps 4-7, confirming the errors do not show and clubs info >loads correctly > >Sponsored-by: Catalyst IT > >Signed-off-by: Mark Tompsett <mtompset@hotmail.com> >--- > Koha/Club/Enrollment.pm | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/Koha/Club/Enrollment.pm b/Koha/Club/Enrollment.pm >index 788f956..168f55b 100644 >--- a/Koha/Club/Enrollment.pm >+++ b/Koha/Club/Enrollment.pm >@@ -59,7 +59,7 @@ sub cancel { > > sub club { > my ( $self ) = @_; >- return Koha::Clubs->find( $self->club_id() ); >+ return scalar Koha::Clubs->find( $self->club_id() ); > } > > =head3 patron >@@ -68,7 +68,7 @@ sub club { > > sub patron { > my ( $self ) = @_; >- return Koha::Patrons->find( $self->borrowernumber() ); >+ return scalar Koha::Patrons->find( $self->borrowernumber() ); > } > > =head3 type >-- >2.1.4
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 19214
:
66661
|
66895
|
66954
|
66955