From e10faadcf7e6d7a8b73841c39c31b51b7fd4b377 Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Thu, 17 Nov 2011 10:59:06 +0100 Subject: [PATCH] fix bug 37: avoid warning about uninitialized value --- PVE/OpenVZ.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PVE/OpenVZ.pm b/PVE/OpenVZ.pm index dbedb7b0..f4efca9a 100644 --- a/PVE/OpenVZ.pm +++ b/PVE/OpenVZ.pm @@ -841,7 +841,7 @@ sub create_config_line { my $text; if (defined($data->{value})) { - if ($confdesc->{$key}->{type} eq 'boolean') { + if ($confdesc->{$key} && $confdesc->{$key}->{type} eq 'boolean') { my $txt = $data->{value} ? 'yes' : 'no'; $text .= uc($key) . "=\"$txt\"\n"; } else {