]> git.proxmox.com Git - pve-storage.git/commitdiff
Storage::get_bandwidth_limit: fix if condition
authorStoiko Ivanov <s.ivanov@proxmox.com>
Fri, 29 Mar 2019 07:27:59 +0000 (08:27 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 29 Mar 2019 08:04:48 +0000 (09:04 +0100)
Passing 'undef' as '$storage_list' led to a warning about using an
uninitialized value as array_ref.

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
PVE/Storage.pm

index 6ad88d3d41b92b9a975a91d8b89af3578a78c0c1..0559538f1813966f90fcb7a5a5653aafdbe8a203 100755 (executable)
@@ -1635,7 +1635,7 @@ sub get_bandwidth_limit {
     }
 
     # Apply per-storage limits - if there are storages involved.
-    if (@$storage_list) {
+    if (defined($storage_list) && @$storage_list) {
        my $config = config();
 
        # The Datastore.Allocate permission allows us to modify the per-storage