PVE::CLIHandler::data_to_text: return '' for undef

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
This commit is contained in:
Stoiko Ivanov 2018-06-26 11:33:46 +02:00 committed by Thomas Lamprecht
parent c1e843677d
commit 16f2033235

View File

@ -432,7 +432,7 @@ my $print_bash_completion = sub {
sub data_to_text {
my ($data) = @_;
return undef if !defined($data);
return '' if !defined($data);
if (my $class = ref($data)) {
return to_json($data, { utf8 => 1, canonical => 1 });