[pve-devel] [mew model rework v2 1/7] avoid error about undefined array
Dietmar Maurer
dietmar at proxmox.com
Mon May 12 12:07:37 CEST 2014
Signed-off-by: Dietmar Maurer <dietmar at proxmox.com>
---
src/PVE/Firewall.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/PVE/Firewall.pm b/src/PVE/Firewall.pm
index 398a015..7e33a1e 100644
--- a/src/PVE/Firewall.pm
+++ b/src/PVE/Firewall.pm
@@ -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);
--
1.7.10.4
More information about the pve-devel
mailing list