]> git.koha-community.org Git - koha.git/commit
Bug 17783: Prevent crash when providing an undefined value
authorLari Taskula <lari.taskula@jns.fi>
Tue, 20 Dec 2016 14:54:44 +0000 (16:54 +0200)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 23 Dec 2016 12:01:57 +0000 (12:01 +0000)
commitc5ca94df995ee7543350bf1bab3a1c80b923340f
treed3a081e5023b0fbba9ac782d82a47da712f0967c
parent401f01125c23fe54e7697b0c22619c4d8e728b12
Bug 17783: Prevent crash when providing an undefined value

When calling the proposed version of get_effective_issuing_rule with undefined
parameter values, a following crash occurs:

SQL::Abstract::puke(): [SQL::Abstract::__ANON__] Fatal: SQL::Abstract before v1.75
used to generate incorrect SQL when the -IN operator was given an undef-containing
list: !!!AUDIT YOUR CODE AND DATA!!! (the upcoming Data::Query-based version of
SQL::Abstract will emit the logically correct SQL instead of raising this
exception) at /home/ubuntu/kohaclone/Koha/Objects.pm line 182

This patch adds a test to cover this problem and fixes the issue.

To test:
1. Run t/db_dependent/Koha/IsssuingRules.t

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Koha/IssuingRules.pm
t/db_dependent/Koha/IssuingRules.t