From: Galen Charlton Date: Sun, 26 Apr 2009 14:48:42 +0000 (-0500) Subject: fix warning in C4::AuthoritiesMarc::merge() X-Git-Tag: v3.00.02-stable~128 X-Git-Url: http://git.rot13.org/?a=commitdiff_plain;h=3e6c57133945e318ac8bf886713f4e7c5cfc26c5;p=koha.git fix warning in C4::AuthoritiesMarc::merge() "my" variable @X masks earlier declaration in same scope at C4/AuthoritiesMarc.pm line 1200 Signed-off-by: Galen Charlton Signed-off-by: Henri-Damien LAURENT --- diff --git a/C4/AuthoritiesMarc.pm b/C4/AuthoritiesMarc.pm index de07677fb4..f2310bf225 100644 --- a/C4/AuthoritiesMarc.pm +++ b/C4/AuthoritiesMarc.pm @@ -1191,10 +1191,8 @@ sub merge { my $authtypecodeto = GetAuthTypeCode($mergeto); # warn "mergefrom : $authtypecodefrom $mergefrom mergeto : $authtypecodeto $mergeto "; # return if authority does not exist - my @X = $MARCfrom->fields(); - return "error MARCFROM not a marcrecord ".Data::Dumper::Dumper($MARCfrom) if $#X == -1; - my @X = $MARCto->fields(); - return "error MARCTO not a marcrecord".Data::Dumper::Dumper($MARCto) if $#X == -1; + return "error MARCFROM not a marcrecord ".Data::Dumper::Dumper($MARCfrom) if scalar($MARCfrom->fields()) == 0; + return "error MARCTO not a marcrecord".Data::Dumper::Dumper($MARCto) if scalar($MARCto->fields()) == 0; # search the tag to report my $sth = $dbh->prepare("select auth_tag_to_report from auth_types where authtypecode=?"); $sth->execute($authtypecodefrom);