]> git.koha-community.org Git - koha.git/commit
Bug 19214: Prevent crash if ->club or ->patron is called in list context
authorAleisha Amohia <aleishaamohia@hotmail.com>
Wed, 30 Aug 2017 23:54:56 +0000 (23:54 +0000)
committerFridolin Somers <fridolin.somers@biblibre.com>
Tue, 12 Sep 2017 14:55:32 +0000 (16:55 +0200)
commit68bbe3fb0d8238bf651d335d5a8dbaf72156f3ee
tree2ff17e9281597fc54ea2fbffb2c1a1ad330fc31a
parent1a50b447d3d58b40d8f84e7c264f01abcb42a826
Bug 19214: Prevent crash if ->club or ->patron is called in list context

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>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 594c48fb5b2c03f5d638d7115e42820294e32343)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Koha/Club/Enrollment.pm