Bug 26063 introduced a new way of checking plugins with Koha::Plugins->call(), except there are now errors all over the OPAC if enable_plugins is zero in the config. Trying to submit a simple search throws this error: Can't use string ("0") as a HASH ref while "strict refs" in use at /home/vagrant/kohaclone/opac/opac-search.pl line 661 This is a bad blocker assuming every instance uses plugins.
Created attachment 107819 [details] [review] Bug 26138: Make Koha::Plugins->call return consistent value It must return an empty array in case the enable_plugins config flag is disabled Test plan: Turn the config off in koha-conf Start a search at the OPAC Without this patch you got: Can't use string ("0") as a HASH ref while "strict refs" in use at /home/vagrant/kohaclone/opac/opac-search.pl line 661 With this patch applied you see the search result
Created attachment 107825 [details] [review] Bug 26138: Make Koha::Plugins->call return consistent value It must return an empty array in case the enable_plugins config flag is disabled Test plan: Turn the config off in koha-conf Start a search at the OPAC Without this patch you got: Can't use string ("0") as a HASH ref while "strict refs" in use at /home/vagrant/kohaclone/opac/opac-search.pl line 661 With this patch applied you see the search result Followed test plan - works as described. Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>
Created attachment 107830 [details] [review] Bug 26138: Make Koha::Plugins->call return consistent value It must return an empty array in case the enable_plugins config flag is disabled Test plan: Turn the config off in koha-conf Start a search at the OPAC Without this patch you got: Can't use string ("0") as a HASH ref while "strict refs" in use at /home/vagrant/kohaclone/opac/opac-search.pl line 661 With this patch applied you see the search result Followed test plan - works as described. Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Clear and consistent fix works as described. Passes QA scripts and no regressions found. Passing QA
Pushed to master for 20.11, thanks to everybody involved!
doesn't apply clean to 20.05.x, will need a rebase