[pve-devel] applied: [PATCH storage 1/1] Storage::get_bandwidth_limit: fix if condition

Thomas Lamprecht t.lamprecht at proxmox.com
Fri Mar 29 09:06:01 CET 2019


On 3/29/19 8:27 AM, Stoiko Ivanov wrote:
> Passing 'undef' as '$storage_list' led to a warning about using an
> uninitialized value as array_ref.
> 
> Signed-off-by: Stoiko Ivanov <s.ivanov at proxmox.com>
> ---
>  PVE/Storage.pm | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/PVE/Storage.pm b/PVE/Storage.pm
> index 6ad88d3..0559538 100755
> --- a/PVE/Storage.pm
> +++ b/PVE/Storage.pm
> @@ -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
> 

applied this one, thanks!




More information about the pve-devel mailing list