]> git.proxmox.com Git - qemu-server.git/commitdiff
fix "Use of uninitialized value $target"
authorAlexandre Derumier <aderumier@odiso.com>
Thu, 2 May 2013 04:33:45 +0000 (06:33 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Thu, 2 May 2013 04:40:01 +0000 (06:40 +0200)
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
PVE/API2/Qemu.pm

index 93458b041c03d6508d5f8e8b5b32d0cbdfd78c4f..f524dfc5427223446fea168f5fc85a96a53097f8 100644 (file)
@@ -1886,7 +1886,7 @@ __PACKAGE__->register_method({
 
         my $localnode = PVE::INotify::nodename();
 
-        undef $target if $target eq $localnode || $target eq 'localhost';
+        undef $target if $target && ($target eq $localnode || $target eq 'localhost');
 
        PVE::Cluster::check_node_exists($target) if $target;