Summary: | Koha::Patron::is_valid_age gives warning about $low variable's numeric comparison | ||
---|---|---|---|
Product: | Koha | Reporter: | Joonas Kylmälä <joonas.kylmala> |
Component: | Architecture, internals, and plumbing | Assignee: | Bugs List <koha-bugs> |
Status: | RESOLVED DUPLICATE | QA Contact: | Testopia <testopia> |
Severity: | trivial | ||
Priority: | P5 - low | CC: | fridolin.somers, jonathan.druart |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Bug Depends on: | |||
Bug Blocks: | 25790 |
I get the following warning message in plack-error.log: > Use of uninitialized value $low in numeric lt (<) at /usr/share/koha/lib/Koha/Patron.pm line 1109. This seems to happen because in /cgi-bin/koha/admin/categories.pl you can set "Age required" field to be empty and then in the is_valid_age subroutine in Patron.pm we compare patroncategory->dateofbirthrequired to numeric value and empty string or undef is not numeric. We should either add input validation to categories.pl or convert dateofbirthrequired to numeric value.