From 95244fd7fabefc8976eed27a89b6692aa4316ade Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Wed, 15 May 2019 10:20:01 +0200 Subject: [PATCH] followup: use defined to check if a hash element can be accessed Signed-off-by: Thomas Lamprecht --- src/PVE/SectionConfig.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PVE/SectionConfig.pm b/src/PVE/SectionConfig.pm index 09ab5c2..5ddb382 100644 --- a/src/PVE/SectionConfig.pm +++ b/src/PVE/SectionConfig.pm @@ -381,7 +381,7 @@ sub check_config { my $value = $config->{$k}; die "can't change value of fixed parameter '$k'\n" - if !$create && $opts->{$k} && $opts->{$k}->{fixed}; + if !$create && defined($opts->{$k}) && $opts->{$k}->{fixed}; if (defined($value)) { my $tmp = $class->check_value($type, $k, $value, $sectionId, $skipSchemaCheck); -- 2.39.2