Bug 20912: (QA follow-up): Fix up Koha::Fees
authorKyle M Hall <kyle@bywatersolutions.com>
Fri, 25 Jan 2019 16:16:41 +0000 (11:16 -0500)
committerNick Clemens <nick@bywatersolutions.com>
Thu, 7 Mar 2019 17:27:36 +0000 (17:27 +0000)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Koha/Fees.pm

index b2bfc4f..33bf3aa 100644 (file)
@@ -47,13 +47,13 @@ sub new {
     my ( $class, $params ) = @_;
 
     Koha::Exceptions::MissingParameter->throw("Missing mandatory parameter: patron")
-        unless $patron;
+        unless $params->{patron};
     Koha::Exceptions::MissingParameter->throw("Missing mandatory parameter: library")
-        unless $library;
+        unless $params->{library};
     Koha::Exceptions::MissingParameter->throw("Missing mandatory parameter: item")
-        unless $item;
+        unless $params->{item};
     Koha::Exceptions::MissingParameter->throw("Missing mandatory parameter: to_date")
-        unless $to_date;
+        unless $params->{to_date};
 
     Carp::confess("Key 'patron' is not a Koha::Patron object!")
       unless $params->{patron}->isa('Koha::Patron');