]> git.koha-community.org Git - koha.git/commit
Bug 18870: Force scalar context for Koha::Club methods
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 5 Jul 2017 23:03:24 +0000 (20:03 -0300)
committerFridolin Somers <fridolin.somers@biblibre.com>
Mon, 10 Jul 2017 10:34:00 +0000 (12:34 +0200)
commitd1de8225e81b4a35c603cf7896c28fbaed55b20e
tree7e9e06a06240b815011df4fe82be598ad5e43d19
parent87cf7af3cd659dad5606685f262c12450e5356ef
Bug 18870: Force scalar context for Koha::Club methods

These 2 methods are called from the template in list context.
However since bug 18539 Koha::Objects->find can no longer be called in
list context.
Forcing the context to scalar fixes the problem and should not
introduced side-effects.

Test plan:
- Create a club template
- Create a club using this template
=> Without this patch you should no longer get the following error:
Template process failed: undef error - Cannot use "->find" in list
context at /home/vagrant/kohaclone/Koha/Club.pm line 51.

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit a81947782bb884feccd5401499f1a6e8f469b0b0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Koha/Club.pm