followup: use defined to check if a hash element can be accessed
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 15 May 2019 08:20:01 +0000 (10:20 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 15 May 2019 08:20:01 +0000 (10:20 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/PVE/SectionConfig.pm

index 09ab5c2..5ddb382 100644 (file)
@@ -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);