From: Stoiko Ivanov Date: Wed, 20 Jun 2018 11:28:36 +0000 (+0200) Subject: cli: print_text_table: ensure default is not undefined X-Git-Url: https://git.proxmox.com/?p=pve-common.git;a=commitdiff_plain;h=eb3dae233f87d952f5a680861ad6484e4d88cd3e cli: print_text_table: ensure default is not undefined Default to printing '', if no default is provided for a column. Signed-off-by: Stoiko Ivanov --- diff --git a/src/PVE/CLIHandler.pm b/src/PVE/CLIHandler.pm index c68aae8..206fda0 100644 --- a/src/PVE/CLIHandler.pm +++ b/src/PVE/CLIHandler.pm @@ -448,7 +448,7 @@ sub print_text_table { push @keys, $key; push @titles, $title; - $defaults{$key} = $default; + $defaults{$key} = $default // ''; # calculate maximal print width and cutoff my $titlelen = length($title);