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.
Created attachment 109790 [details] [review] 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 (<)"
Created attachment 113909 [details] [review] Bug 26922: Regression tests Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Michal Denar <black23@gmail.com>
This seems to have Signed off status accidentally marked from when the patch relating to other bug was accidentally added here. Moving to Needs Signoff.
Created attachment 114710 [details] [review] 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>
Note: no warning in the tests before the patch. Only when using the UI.
Created attachment 114947 [details] [review] 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>
Pushed to master for 21.05, thanks to everybody involved!
Pushed to 20.11.x for 20.11.02
Pushed to 20.05.x for 20.05.08
Not backported to oldoldstable (19.11.x). Feel free to ask if it's needed.
*** Bug 26590 has been marked as a duplicate of this bug. ***