From 80c84834d3ad172e34dacbc95a1d82f4a91640a7 Mon Sep 17 00:00:00 2001
From: Mathieu Saby <mathsabypro@gmail.com>
Date: Mon, 14 Jul 2014 00:15:04 +0200
Subject: [PATCH 2/2] Bug 11230: dereference hashes in keys (QA followup)
Content-Type: text/plain; charset="utf-8"

This followup replaces $params with %$params in keys function
It also fixes some wording

---
 C4/Stats.pm |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/C4/Stats.pm b/C4/Stats.pm
index 078595d..a1098ae 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 ) {
-- 
1.7.9.5