Permalink
Browse files

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 <chrisc@catalyst.net.nz>
  • Loading branch information...
colinsc authored and ranginui committed Apr 21, 2011
1 parent ecf4bb9 commit 420dcba56457c981d21d93fe5a7c00f7643a1c3d
Showing with 1 addition and 2 deletions.
  1. +1 −2 cataloguing/additem.pl
View
@@ -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 @@ sub generate_subfield_form {
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};

0 comments on commit 420dcba

Please sign in to comment.