[Koha-bugs] [Bug 6772] Implementation of a recommendations engine

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Apr 16 09:03:10 CEST 2013


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6772

--- Comment #8 from Chris Hall <chrish at catalyst.net.nz> ---
Created attachment 17483
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=17483&action=edit
Fixing array reference bug in recommendations.pm

Attached patch fixes a small reference bug in Recommendations.pm (included in
the previous patch) that only occurs when we have more recommendations than the
limit (default value of 100)

$res = \@{ @{$res}[0..$limit] } if (@$res > $limit);

will cause an error as it tries to interpret the items within $res as arrayrefs
when they are hashrefs. What we really want to do is shorten our results down
to never be longer than limit:

$res = [ @{$res}[0..$limit] ] if (@$res > $limit);

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are watching all bug changes.


More information about the Koha-bugs mailing list