From 374a8422a03f8072b1fe6cb9e4002af4a547c1cb Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 20 Feb 2026 11:08:16 +0100 Subject: [PATCH] Bug 41893: Remove C4::Context from Koha::Plugins's BEGIN block Can't locate object method "config" via package "C4::Context" at /kohadevbox/koha/Koha/Plugins.pm line 44. --- Koha/Plugins.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Koha/Plugins.pm b/Koha/Plugins.pm index d75a650c17a..b49061a1225 100644 --- a/Koha/Plugins.pm +++ b/Koha/Plugins.pm @@ -32,6 +32,7 @@ use POSIX qw(getpid); use C4::Context; use C4::Output; +use Koha::Config; use Koha::Cache::Memory::Lite; use Koha::Exceptions; use Koha::Exceptions::Plugin; @@ -41,7 +42,7 @@ use Koha::Plugins::Methods; use constant ENABLED_PLUGINS_CACHE_KEY => 'enabled_plugins'; BEGIN { - my $pluginsdir = C4::Context->config("pluginsdir"); + my $pluginsdir = Koha::Config->get_instance->get("pluginsdir"); my @pluginsdir = ref($pluginsdir) eq 'ARRAY' ? @$pluginsdir : $pluginsdir; push @INC, array_minus( @pluginsdir, @INC ); pop @INC if $INC[-1] eq '.'; -- 2.43.0