[Koha-patches] [PATCH] Add 'use warnings' and correct uninitialized value warnings.
Stan Brinkerhoff
koha at brinkerhoff.org
Wed Dec 24 13:41:56 CET 2008
---
admin/branches.pl | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/admin/branches.pl b/admin/branches.pl
index fecc030..6ce54a3 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 );
--
1.5.6.5
More information about the Koha-patches
mailing list