Summary: | Remove warn in Koha::Patron is_valid_age | ||
---|---|---|---|
Product: | Koha | Reporter: | Fridolin Somers <fridolin.somers> |
Component: | Patrons | Assignee: | Fridolin Somers <fridolin.somers> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | normal | ||
Priority: | P5 - low | CC: | andrew, caroline.cyr-la-rose, gmcharlt, jonathan.druart, joonas.kylmala, julian.maurice, kyle.m.hall, victor |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
21.05.00,20.11.02,20.05.08
|
|
Circulation function: | |||
Bug Depends on: | 17492 | ||
Bug Blocks: | 25515 | ||
Attachments: |
Bug 26417: Remove warn in Koha::Patron is_valid_age
Bug 26922: Regression tests Bug 26417: Remove warn in Koha::Patron is_valid_age Bug 26417: Remove warn in Koha::Patron is_valid_age |
Description
Fridolin Somers
2020-09-09 11:52:45 UTC
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. *** |