From 420dcba56457c981d21d93fe5a7c00f7643a1c3d Mon Sep 17 00:00:00 2001 From: Colin Campbell Date: Thu, 21 Apr 2011 16:13:46 +0100 Subject: [PATCH] Bug 6237: Remove redeclarations of global vars in same scope Scripts should be able to compile without warnings as a minimal test a couple of variables are redeclared in the same scope generating warnings. Remove the redeclations Signed-off-by: Chris Cormack --- cataloguing/additem.pl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cataloguing/additem.pl b/cataloguing/additem.pl index 43fb19f0fa..faa9a0ad06 100755 --- a/cataloguing/additem.pl +++ b/cataloguing/additem.pl @@ -262,7 +262,6 @@ sub generate_subfield_form { my $input = new CGI; -my $dbh = C4::Context->dbh; my $error = $input->param('error'); my $biblionumber = $input->param('biblionumber'); my $itemnumber = $input->param('itemnumber'); @@ -574,7 +573,7 @@ my $onlymine = C4::Context->preference('IndependantBranches') && my $branches = GetBranchesLoop(C4::Context->userenv->{branch},$onlymine); # build once ahead of time, instead of multiple times later. # We generate form, from actuel record -my @fields; +@fields = (); if($itemrecord){ foreach my $field ($itemrecord->fields()){ my $tag = $field->{_tag}; -- 2.11.0