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. Signed-off-by: Petro Vashchuk <stalkernoid@gmail.com> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> (cherry picked from commit297dbf4a59) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> (cherry picked from commitd448f7a8b9) Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
This commit is contained in:
parent
674b54c2c2
commit
a040bd34dd
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue