]> git.proxmox.com Git - pve-common.git/blobdiff - src/PVE/SectionConfig.pm
prevent autovivification of sectionconfig options
[pve-common.git] / src / PVE / SectionConfig.pm
index cc03aeaed638db1a4f6c4a736ade97ea90633649..09ab5c2a3b023d614707ea1c4421469ef56b54a8 100644 (file)
@@ -379,10 +379,10 @@ sub check_config {
 
     foreach my $k (keys %$config) {
        my $value = $config->{$k};
-       
+
        die "can't change value of fixed parameter '$k'\n"
-           if !$create && $opts->{$k}->{fixed};
-       
+           if !$create && $opts->{$k} && $opts->{$k}->{fixed};
+
        if (defined($value)) {
            my $tmp = $class->check_value($type, $k, $value, $sectionId, $skipSchemaCheck);
            $settings->{$k} = $class->decode_value($type, $k, $tmp);