]> git.proxmox.com Git - qemu-server.git/commitdiff
correct use hash with keys
authorDietmar Maurer <dietmar@proxmox.com>
Fri, 27 Feb 2015 11:56:38 +0000 (12:56 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Fri, 27 Feb 2015 11:58:41 +0000 (12:58 +0100)
PVE/API2/Qemu.pm

index def4e5cf7ecbf4bfe80e603b2b3a7c61d83424b0..8238c9c1321e287fbcb223b99de4e2c2f5815449 100644 (file)
@@ -687,7 +687,7 @@ __PACKAGE__->register_method({
        delete $conf->{snapshots};
 
        if (!$param->{current}) {
-           foreach my $opt (keys $conf->{pending}) {
+           foreach my $opt (keys %{$conf->{pending}}) {
                next if $opt eq 'delete';
                my $value = $conf->{pending}->{$opt};
                next if ref($value); # just to be sure
@@ -758,7 +758,7 @@ __PACKAGE__->register_method({
 
        my $res = [];
 
-       foreach my $opt (keys $conf) {
+       foreach my $opt (keys %$conf) {
            next if ref($conf->{$opt});
            my $item = { key => $opt };
            $item->{value} = $conf->{$opt} if defined($conf->{$opt});
@@ -767,7 +767,7 @@ __PACKAGE__->register_method({
            push @$res, $item;
        }
 
-       foreach my $opt (keys $conf->{pending}) {
+       foreach my $opt (keys %{$conf->{pending}}) {
            next if $opt eq 'delete';
            next if ref($conf->{pending}->{$opt}); # just to be sure
            next if defined($conf->{$opt});