[Koha-patches] [PATCH 1/2] Bug 6237: Remove redeclarations of global vars in same scope

Colin Campbell colin.campbell at ptfs-europe.com
Thu Apr 21 17:13:46 CEST 2011


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
---
 cataloguing/additem.pl |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/cataloguing/additem.pl b/cataloguing/additem.pl
index 43fb19f..faa9a0a 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;
+ at fields = ();
 if($itemrecord){
     foreach my $field ($itemrecord->fields()){
         my $tag = $field->{_tag};
-- 
1.7.4.4



More information about the Koha-patches mailing list