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