Bug 26417: Remove warn in Koha::Patron is_valid_age
authorFridolin Somers <fridolin.somers@biblibre.com>
Wed, 9 Sep 2020 11:54:34 +0000 (13:54 +0200)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 8 Jan 2021 14:17:27 +0000 (15:17 +0100)
commitf042c804cda09deaee614f73ec9a888bea4ab99a
tree9ec5fe1a00bf16a9a2415b204d4b023df7022d25
parent31ec92bfab16654b2a3f763d141559d0f882a1e7
Bug 26417: Remove warn in Koha::Patron is_valid_age

In Koha::Patron is_valid_age the is a compare : $age < $low
But $low may be undef.
It generates a warn :
Use of uninitialized value $low in numeric lt (<)

Needs a test like for $high.

Test plan :
1) Run prove t/db_dependent/Koha/Patrons.t
2) Edit a patron catetory, empty "Age required" and save
3) Edit a patron of this category
4) Check in logs you don't see "Use of uninitialized value $low in numeric lt (<)"

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Koha/Patron.pm