[Koha-patches] [PATCH] [SIGNED-OFF 3/3] Bug 5392 Initialize vars used in building url strings

Galen Charlton gmcharlt at gmail.com
Fri Nov 12 13:35:47 CET 2010


From: Colin Campbell <colin.campbell at ptfs-europe.com>

If no failures are to be added to the to the strings for redirect
the corresponding variables are undefined causing warnings
to be logged. Initialize them so that the error log is not
being filled with trivia.

Signed-off-by: Galen Charlton <gmcharlt at gmail.com>
---
 reserve/renewscript.pl |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/reserve/renewscript.pl b/reserve/renewscript.pl
index 4444e7c..ad746c9 100755
--- a/reserve/renewscript.pl
+++ b/reserve/renewscript.pl
@@ -77,7 +77,7 @@ my $cardnumber = $input->param("cardnumber");
 my $borrowernumber = $input->param("borrowernumber");
 my $exemptfine = $input->param("exemptfine") || 0;
 my $override_limit = $input->param("override_limit") || 0;
-my $failedrenews;
+my $failedrenews = q{};
 foreach my $itemno (@data) {
     # check status before renewing issue
 	my ($renewokay,$error) = CanBookBeRenewed($borrowernumber,$itemno,$override_limit);
@@ -88,7 +88,7 @@ foreach my $itemno (@data) {
 		$failedrenews.="&failedrenew=$itemno";        
 	}
 }
-my $failedreturn;
+my $failedreturn = q{};
 foreach my $barcode (@barcodes) {
     # check status before renewing issue
    my ( $returned, $messages, $issueinformation, $borrower ) = 
-- 
1.7.0



More information about the Koha-patches mailing list