From 3e201530ed8e56a4f49e66067a71ad82ad2a558e Mon Sep 17 00:00:00 2001 From: Mathieu Saby Date: Mon, 14 Jul 2014 00:15:04 +0200 Subject: [PATCH] Bug 11230: dereference hashes in keys (QA followup) This followup replaces $params with %$params in keys function It also fixes some wording Signed-off-by: Kyle M Hall Signed-off-by: Tomas Cohen Arazi --- C4/Stats.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/C4/Stats.pm b/C4/Stats.pm index 078595d6a5..a1098ae422 100644 --- a/C4/Stats.pm +++ b/C4/Stats.pm @@ -94,7 +94,7 @@ sub UpdateStats { my @mandatory_keys = (); if (! exists $params->{type} or ! defined $params->{type}) { - croak ("UpdateStats does not received type param"); + croak ("UpdateStats did not received type param"); } if (grep ($_ eq $params->{type}, @allowed_circulation_types )) { @mandatory_keys = @circulation_mandatory_keys; @@ -105,13 +105,13 @@ sub UpdateStats { } my @missing_params = (); for my $mykey (@mandatory_keys ) { - push @missing_params, $mykey if !grep (/^$mykey/, keys $params); + push @missing_params, $mykey if !grep (/^$mykey/, keys %$params); } if (scalar @missing_params > 0 ) { - croak ("UpdateStats does not received mandatory param(s): ".join (", ",@missing_params )); + croak ("UpdateStats did not received mandatory param(s): ".join (", ",@missing_params )); } my @invalid_params = (); - for my $myparam (keys $params ) { + for my $myparam (keys %$params ) { push @invalid_params, $myparam unless grep (/^$myparam$/, @allowed_keys); } if (scalar @invalid_params > 0 ) { -- 2.39.5