[Koha-bugs] [Bug 17820] Do not use search->next when find can be used
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Wed Dec 28 14:34:20 CET 2016
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17820
--- Comment #1 from Jonathan Druart <jonathan.druart at bugs.koha-community.org> ---
Created attachment 58466
-->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=58466&action=edit
Bug 17820: use ->find instead of search->next
>From C4::Auth:
my $patron = Koha::Patrons->search({ userid => $userid })->next;
This should be replaced with
my $patron = Koha::Patrons->find({ userid => $userid });
userid is a unique key
Caught with NYTProf:
# spent 78.9ms making 1 call to Koha::Objects::next
Test plan:
Login at the intranet
Reload the page
=> You must still be logged in
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list