]> git.proxmox.com Git - pve-common.git/commitdiff
PVE::CLIHandler::data_to_text: return '' for undef
authorStoiko Ivanov <s.ivanov@proxmox.com>
Tue, 26 Jun 2018 09:33:46 +0000 (11:33 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 27 Jun 2018 09:00:19 +0000 (11:00 +0200)
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
src/PVE/CLIHandler.pm

index 9933df704e34c0b9a616a5160716efd0bad6fe5a..dfdc41c158a352360618b8fb173a904735430a88 100644 (file)
@@ -432,7 +432,7 @@ my $print_bash_completion = sub {
 sub data_to_text {
     my ($data) = @_;
 
 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 });
 
     if (my $class = ref($data)) {
        return to_json($data, { utf8 => 1, canonical => 1 });