Bug 28053: Squash warning in C4::Members
authorMartin Renvoize <martin.renvoize@ptfs-europe.com>
Tue, 30 Mar 2021 11:15:22 +0000 (12:15 +0100)
committerAndrew Fuerste-Henry <andrew@bywatersolutions.com>
Sat, 24 Apr 2021 16:18:17 +0000 (16:18 +0000)
commita040bd34dd420f679cc25f9ff28d06604c9046af
treeb2fc7bfaeecf87357e43b50d4cbb0ca350889feb
parent674b54c2c25a3674d8417a68db7554128dbfb479
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 commit 297dbf4a5935931cdb8ebf6b9f00f60e291699df)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit d448f7a8b97cfd1bf5717c0aadf7c2694feec0d1)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
C4/Members.pm