From f7644cf30725c0a73d0d6f16f22f1aae2ad9cb85 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 6 Dec 2018 16:54:39 -0300 Subject: [PATCH] Bug 18936: Fix syntax issue MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Minna Kivinen Signed-off-by: Joonas Kylmälä Signed-off-by: Martin Renvoize --- Koha/CirculationRules.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Koha/CirculationRules.pm b/Koha/CirculationRules.pm index a6ed947ebe..d462a2137d 100644 --- a/Koha/CirculationRules.pm +++ b/Koha/CirculationRules.pm @@ -18,6 +18,7 @@ package Koha::CirculationRules; # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. use Modern::Perl; +use Carp qw(croak); use Koha::Exceptions; use Koha::CirculationRule; @@ -239,10 +240,11 @@ sub get_effective_rules { sub set_rule { my ( $self, $params ) = @_; - for my $mandatory_parameter (qw( branchcode categorycode itemtype rule_name rule_value ) ){ + for my $mandatory_parameter (qw( branchcode categorycode itemtype rule_name rule_value ) ) { Koha::Exceptions::MissingParameter->throw( "Required parameter 'branchcode' missing") unless exists $params->{$mandatory_parameter}; + } my $kind_info = $RULE_KINDS->{ $params->{rule_name} }; croak "set_rule given unknown rule '$params->{rule_name}'!" -- 2.39.5