Bug 16975 : @INC should not have '.' as its last entry
authorChris Cormack <chrisc@catalyst.net.nz>
Mon, 25 Jul 2016 20:57:50 +0000 (08:57 +1200)
committerBrendan Gallagher <brendan@bywatersolutions.com>
Thu, 4 Aug 2016 19:39:11 +0000 (19:39 +0000)
To Test
1/ Try using a plugin
2/ Apply patch
3/ Test plugin still works

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>

Koha/Plugins.pm
Koha/Plugins/Handler.pm

index bca7701..a188d7c 100644 (file)
@@ -27,6 +27,7 @@ use C4::Output;
 
 BEGIN {
     push @INC, C4::Context->config("pluginsdir");
+    pop @INC if $INC[-1] eq '.';
 }
 
 =head1 NAME
index 903b446..0c0a7b4 100644 (file)
@@ -27,6 +27,7 @@ use C4::Context;
 
 BEGIN {
     push @INC, C4::Context->config("pluginsdir");
+     pop @INC if $INC[-1] eq '.' ;
 }
 
 =head1 NAME