From dc370aeeeebcbeec25df586437119009c03fd161 Mon Sep 17 00:00:00 2001 From: Stan Brinkerhoff Date: Wed, 24 Dec 2008 07:41:56 -0500 Subject: [PATCH] Add 'use warnings' and correct uninitialized value warnings. Signed-off-by: Galen Charlton --- admin/branches.pl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/admin/branches.pl b/admin/branches.pl index fecc030df0..6ce54a3631 100755 --- a/admin/branches.pl +++ b/admin/branches.pl @@ -44,6 +44,7 @@ FIXME: looped html (e.g., list of checkboxes) need to be properly =cut use strict; +use warnings; use CGI; use C4::Auth; use C4::Context; @@ -63,6 +64,10 @@ my $branchname = $input->param('branchname'); my $categorycode = $input->param('categorycode'); my $op = $input->param('op'); +if(!defined($op)){ + $op = ''; +} + my ( $template, $borrowernumber, $cookie ) = get_template_and_user( { template_name => "admin/branches.tmpl", @@ -338,7 +343,7 @@ sub branchinfotable { $branchinfo = GetBranchInfo(undef,'properties'); } my $toggle; - my $i; + my $i = 0; my @loop_data = (); foreach my $branch (@$branchinfo) { ( $i % 2 ) ? ( $toggle = 1 ) : ( $toggle = 0 ); -- 2.39.5