]> git.proxmox.com Git - pve-firewall.git/commitdiff
avoid error about undefined array
authorDietmar Maurer <dietmar@proxmox.com>
Mon, 12 May 2014 11:33:13 +0000 (13:33 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Tue, 13 May 2014 05:16:01 +0000 (07:16 +0200)
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
src/PVE/Firewall.pm

index 398a015611256dbb55950dccf2f2821eed102cbc..7e33a1e613bd394ad88406ab8cf08ee99aedbaea 100644 (file)
@@ -2357,7 +2357,7 @@ sub save_vmfw_conf {
     my $options = $vmfw_conf->{options};
     $raw .= &$format_options($options) if scalar(keys %$options);
 
-    my $rules = $vmfw_conf->{rules};
+    my $rules = $vmfw_conf->{rules} || [];
     if (scalar(@$rules)) {
        $raw .= "[RULES]\n\n";
        $raw .= &$format_rules($rules, 1);