]> git.proxmox.com Git - pve-manager-legacy.git/commitdiff
fix iteration over hash without keys
authorDominik Csapak <d.csapak@proxmox.com>
Fri, 20 Nov 2020 14:14:22 +0000 (15:14 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 20 Nov 2020 14:34:27 +0000 (15:34 +0100)
without 'keys' we iterate also over the values and use them as keys

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
PVE/API2/ReplicationConfig.pm

index 63b9cfca744398ce9bbea83ae22d3ae1120dfc83..8af62621437dc0a23735f7ebae9c9c4bcb6d4397 100644 (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};
            }