From 7f9e28e45c44f85e8eefdf014fcd9a6b34973be0 Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Thu, 27 Aug 2015 14:56:36 +0200 Subject: [PATCH] fix 'uninitialized value in concat' due to unnamed VM This is an minor fix which let's you start the spice console on an unnamed VM without getting the 'Use of uninitialized value in concatenation' error. Also changes the trailing comma from the $conf definition lineto an semicolon. Signed-off-by: Thomas Lamprecht --- PVE/API2/Qemu.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm index db6424e2..513b224e 100644 --- a/PVE/API2/Qemu.pm +++ b/PVE/API2/Qemu.pm @@ -1397,7 +1397,8 @@ __PACKAGE__->register_method({ my $proxy = $param->{proxy}; my $conf = PVE::QemuServer::load_config($vmid, $node); - my $title = "VM $vmid - $conf->{'name'}", + my $title = "VM $vmid"; + $title .= " - ". $conf->{name} if $conf->{name}; my $port = PVE::QemuServer::spice_port($vmid);