diff --git a/lib/FusionInventory/Agent/Task/Deploy.pm b/lib/FusionInventory/Agent/Task/Deploy.pm index 85f79d8490..a18d3618a8 100644 --- a/lib/FusionInventory/Agent/Task/Deploy.pm +++ b/lib/FusionInventory/Agent/Task/Deploy.pm @@ -91,10 +91,9 @@ sub _validateAnswer { $$msgRef = "associatedFiles should be an hash"; return; } - - foreach my $k (%{$answer->{associatedFiles}}) { + foreach my $k (keys %{$answer->{associatedFiles}}) { foreach (qw/mirrors multiparts name/) { - if (!defined($answer->{associatedFiles}{$k}{$_})) { + if (!defined($answer->{associatedFiles}->{$k}->{$_})) { $$msgRef = "Missing key `$_' in associatedFiles"; return; }