fix iteration over hash without keys

without 'keys' we iterate also over the values and use them as keys

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
Dominik Csapak 2020-11-20 15:14:22 +01:00 committed by Thomas Lamprecht
parent d1cbfe0fa2
commit 846ff6395b

View File

@ -189,7 +189,7 @@ __PACKAGE__->register_method ({
my $plugin = PVE::ReplicationConfig->lookup($data->{type});
my $opts = $plugin->check_config($id, $param, 0, 1);
foreach my $k (%$opts) {
foreach my $k (keys %$opts) {
$data->{$k} = $opts->{$k};
}