From 396aedff95abaf9573661ea5c07755b7734ecf8b Mon Sep 17 00:00:00 2001 From: Stoiko Ivanov Date: Fri, 5 Apr 2019 16:33:34 +0200 Subject: [PATCH] get_bandwidt_limits: ignore 'undef' as storage If one of the storages passed in $storage_list was not defined get_bandwidth_limit died (see [0], of an occurence of this). This patch changes the behavior to ignore undef as storage instead. [0] https://pve.proxmox.com/pipermail/pve-devel/2019-April/036515.html Signed-off-by: Stoiko Ivanov --- PVE/Storage.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/PVE/Storage.pm b/PVE/Storage.pm index 0559538..eb5e86f 100755 --- a/PVE/Storage.pm +++ b/PVE/Storage.pm @@ -1646,6 +1646,7 @@ sub get_bandwidth_limit { my %done; foreach my $storage (@$storage_list) { + next if !defined($storage); # Avoid duplicate checks: next if $done{$storage}; $done{$storage} = 1; -- 2.39.2