]> git.proxmox.com Git - pve-common.git/commitdiff
Tools.pm: do not ignore "0" in split_list
authorDominik Csapak <d.csapak@proxmox.com>
Tue, 20 Nov 2018 11:45:15 +0000 (12:45 +0100)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Wed, 21 Nov 2018 10:06:20 +0000 (11:06 +0100)
giving split_list the string "0" would actually return
an empty list instead of a list with the element "0"

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
src/PVE/Tools.pm

index 0f31fdbe6f4f98750be4b8e0c9098416cd6a85a9..accf6539da94d2b5d5b6f4539310fe5c4d526c7e 100644 (file)
@@ -640,7 +640,7 @@ sub pipe_socket_to_command  {
 }
 
 sub split_list {
 }
 
 sub split_list {
-    my $listtxt = shift || '';
+    my $listtxt = shift // '';
 
     return split (/\0/, $listtxt) if $listtxt =~ m/\0/;
 
 
     return split (/\0/, $listtxt) if $listtxt =~ m/\0/;