From 3c684eb57ba68f5a9dc48f734aa75d52b232148f Mon Sep 17 00:00:00 2001 From: Pedro Amorim Date: Thu, 28 Mar 2024 15:52:00 -0100 Subject: [PATCH] Fix new_ill_backend --- Koha/Plugin/Com/PTFSEurope/PluginBackend.pm | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/Koha/Plugin/Com/PTFSEurope/PluginBackend.pm b/Koha/Plugin/Com/PTFSEurope/PluginBackend.pm index 09d2316..d7995fa 100644 --- a/Koha/Plugin/Com/PTFSEurope/PluginBackend.pm +++ b/Koha/Plugin/Com/PTFSEurope/PluginBackend.pm @@ -17,7 +17,7 @@ use File::Basename qw( dirname ); use Koha::Libraries; use Koha::Patrons; -our $VERSION = "2.0.3"; +our $VERSION = "2.0.4"; our $metadata = { name => 'PluginBackend', @@ -168,15 +168,11 @@ Required method utilized by I load_backend sub new_ill_backend { my ( $self, $params ) = @_; - my $backend = { - _logger => $params->{logger}, - _config => $params->{config}, - _plugin => $self, - }; - - bless( $backend, $self ); + $self->{_logger} = $params->{logger} if ( $params->{logger} ); + $self->{_config} = $params->{config} if ( $params->{config} ); + $self->{_plugin} = $self; - return $backend; + return $self; } =head3 create