From 16f2033235c88c7fae931936f82e441575f7a83d Mon Sep 17 00:00:00 2001 From: Stoiko Ivanov Date: Tue, 26 Jun 2018 11:33:46 +0200 Subject: [PATCH 1/1] PVE::CLIHandler::data_to_text: return '' for undef Signed-off-by: Stoiko Ivanov --- src/PVE/CLIHandler.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PVE/CLIHandler.pm b/src/PVE/CLIHandler.pm index 9933df7..dfdc41c 100644 --- a/src/PVE/CLIHandler.pm +++ b/src/PVE/CLIHandler.pm @@ -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 }); -- 2.39.2