Bugzilla – Attachment 114947 Details for
Bug 26417
Remove warn in Koha::Patron is_valid_age
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26417: Remove warn in Koha::Patron is_valid_age
Bug-26417-Remove-warn-in-KohaPatron-isvalidage.patch (text/plain), 1.32 KB, created by
Julian Maurice
on 2021-01-08 08:45:14 UTC
(
hide
)
Description:
Bug 26417: Remove warn in Koha::Patron is_valid_age
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2021-01-08 08:45:14 UTC
Size:
1.32 KB
patch
obsolete
>From d6fb81a3a7236dc42d468286205ca5b19e5e00e3 Mon Sep 17 00:00:00 2001 >From: Fridolin Somers <fridolin.somers@biblibre.com> >Date: Wed, 9 Sep 2020 13:54:34 +0200 >Subject: [PATCH] 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> >--- > Koha/Patron.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/Koha/Patron.pm b/Koha/Patron.pm >index 64e8fac486..6ea9e5aae7 100644 >--- a/Koha/Patron.pm >+++ b/Koha/Patron.pm >@@ -1166,7 +1166,7 @@ sub is_valid_age { > my $patroncategory = $self->category; > my ($low,$high) = ($patroncategory->dateofbirthrequired, $patroncategory->upperagelimit); > >- return (defined($age) && (($high && ($age > $high)) or ($age < $low))) ? 0 : 1; >+ return (defined($age) && (($high && ($age > $high)) or ($low && ($age < $low)))) ? 0 : 1; > } > > =head3 account >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 26417
:
109790
|
113909
|
114710
| 114947