]> git.proxmox.com Git - pve-common.git/commitdiff
Fix uninitialized subroutine error
authorFabian Grünbichler <f.gruenbichler@proxmox.com>
Tue, 5 Apr 2016 10:59:33 +0000 (12:59 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Tue, 5 Apr 2016 13:22:27 +0000 (15:22 +0200)
src/PVE/RESTHandler.pm

index ad76b01e410c85587692b4b232b98a4a237a1180..8d6f5779570826337f93c81d73f7f03e74771bf4 100644 (file)
@@ -574,8 +574,9 @@ sub usage_str {
            $base = "${name}[n]";
        }
 
            $base = "${name}[n]";
        }
 
+       my $mapping = defined($stringfilemap) ? &$stringfilemap($name) : undef;
        $opts .= &$get_property_description($base, 'arg', $prop->{$k}, 'text',
        $opts .= &$get_property_description($base, 'arg', $prop->{$k}, 'text',
-                                           $hidepw, &$stringfilemap($name));
+                                           $hidepw, $mapping);
 
        if (!$prop->{$k}->{optional}) {
            $args .= " " if $args;
 
        if (!$prop->{$k}->{optional}) {
            $args .= " " if $args;