Bugzilla – Attachment 118989 Details for
Bug 28053
Warning in C4::Members::patronflags
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28053: Squash warning in C4::Members
Bug-28053-Squash-warning-in-C4Members.patch (text/plain), 1.33 KB, created by
Martin Renvoize
on 2021-03-30 11:18:26 UTC
(
hide
)
Description:
Bug 28053: Squash warning in C4::Members
Filename:
MIME Type:
Creator:
Martin Renvoize
Created:
2021-03-30 11:18:26 UTC
Size:
1.33 KB
patch
obsolete
>From 312b1762e71014ed3710afb91e273193333be12b Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Tue, 30 Mar 2021 12:15:22 +0100 >Subject: [PATCH] Bug 28053: Squash warning in C4::Members > >This patch sets guarantess_non_issues_charges to '0' upon creation of >the variable and thus prevents 'Use of uninitialized value >$guarantees_non_issues_charges in numeric gt (>) at >/home/martin/kohaclone/C4/Members.pm line 183.' being thrown when the >patron has guaruntees without any charges. > >Test plan >1. Run t/db_dependant/SIP/SIPServer.t and note the warning above is > thrown at least once. >2. Apply the patch >3. Run the test again and note the warning has gone. >--- > C4/Members.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/C4/Members.pm b/C4/Members.pm >index 05056345e3..57a4daa614 100644 >--- a/C4/Members.pm >+++ b/C4/Members.pm >@@ -175,7 +175,7 @@ sub patronflags { > if ( defined $no_issues_charge_guarantees ) { > my $p = Koha::Patrons->find( $patroninformation->{borrowernumber} ); > my @guarantees = map { $_->guarantee } $p->guarantee_relationships; >- my $guarantees_non_issues_charges; >+ my $guarantees_non_issues_charges = 0; > foreach my $g ( @guarantees ) { > $guarantees_non_issues_charges += $g->account->non_issues_charges; > } >-- >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 28053
:
118989
|
118995
|
119063