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)
committerChris Cormack <chris@bigballofwax.co.nz>
Mon, 8 Aug 2016 07:09:30 +0000 (19:09 +1200)
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>
(cherry picked from commit 28eae42d2d09c14d0bb1bd3e1655714b33711ab3)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 1cf1c89f304fd2d84a1264041e8834444d1c8bf3)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>

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

index d905554..39eb2df 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