[Koha-patches] [PATCH] Quell 7 warnings: "my" variable $irule masks earlier declaration in same scope.
Joe Atzberger
joe.atzberger at liblime.com
Tue Apr 8 16:50:19 CEST 2008
---
C4/Circulation.pm | 19 ++++++++++---------
1 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/C4/Circulation.pm b/C4/Circulation.pm
index 634135c..964d071 100644
--- a/C4/Circulation.pm
+++ b/C4/Circulation.pm
@@ -1112,37 +1112,38 @@ sub GetIssuingRule {
my ( $borrowertype, $itemtype, $branchcode ) = @_;
my $dbh = C4::Context->dbh;
my $sth = $dbh->prepare( "select * from issuingrules where categorycode=? and itemtype=? and branchcode=? and issuelength is not null" );
-
+ my $irule;
+
$sth->execute( $borrowertype, $itemtype, $branchcode );
- my $irule = $sth->fetchrow_hashref;
+ $irule = $sth->fetchrow_hashref;
return $irule if defined($irule) ;
$sth->execute( $borrowertype, $itemtype, "*" );
- my $irule = $sth->fetchrow_hashref;
+ $irule = $sth->fetchrow_hashref;
return $irule if defined($irule) ;
$sth->execute( $borrowertype, "*", $branchcode );
- my $irule = $sth->fetchrow_hashref;
+ $irule = $sth->fetchrow_hashref;
return $irule if defined($irule) ;
$sth->execute( "*", $itemtype, $branchcode );
- my $irule = $sth->fetchrow_hashref;
+ $irule = $sth->fetchrow_hashref;
return $irule if defined($irule) ;
$sth->execute( $borrowertype, "*", "*" );
- my $irule = $sth->fetchrow_hashref;
+ $irule = $sth->fetchrow_hashref;
return $irule if defined($irule) ;
$sth->execute( "*", "*", $branchcode );
- my $irule = $sth->fetchrow_hashref;
+ $irule = $sth->fetchrow_hashref;
return $irule if defined($irule) ;
$sth->execute( "*", $itemtype, "*" );
- my $irule = $sth->fetchrow_hashref;
+ $irule = $sth->fetchrow_hashref;
return $irule if defined($irule) ;
$sth->execute( "*", "*", "*" );
- my $irule = $sth->fetchrow_hashref;
+ $irule = $sth->fetchrow_hashref;
return $irule if defined($irule) ;
# if no rule matches,
--
1.5.2.1
More information about the Koha-patches
mailing list