From 3b9f657cde3311f7e9ef0edef1f182076a0f0cf9 Mon Sep 17 00:00:00 2001 From: Martin Helmling Date: Tue, 26 Nov 2019 13:49:57 +0100 Subject: [PATCH] =?utf8?q?Inventory-Helper:=20Nur=20gesetzte=20Constraints?= =?utf8?q?=20ber=C3=BCcksichtigen?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Werden als Parameter nicht definierte Constraints übergeben, werden diese nun übersprungen --- SL/Helper/Inventory.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/SL/Helper/Inventory.pm b/SL/Helper/Inventory.pm index a1a142803..17ecc20e1 100644 --- a/SL/Helper/Inventory.pm +++ b/SL/Helper/Inventory.pm @@ -283,6 +283,7 @@ sub check_constraints { for (keys %$constraints ) { croak "unsupported constraint '$_'" unless $supported_constraints{$_}; + next unless defined $constraints->{$_}; my %whitelist = map { (ref $_ ? $_->id : $_) => 1 } listify($constraints->{$_}); my $accessor = $supported_constraints{$_}; -- 2.20.1