Bug 6237: Remove redeclarations of global vars in same scope
authorColin Campbell <colin.campbell@ptfs-europe.com>
Thu, 21 Apr 2011 15:13:46 +0000 (16:13 +0100)
committerChris Cormack <chrisc@catalyst.net.nz>
Thu, 21 Apr 2011 19:30:54 +0000 (07:30 +1200)
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>
cataloguing/additem.pl

index 43fb19f..faa9a0a 100755 (executable)
@@ -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};