]> git.koha-community.org Git - koha.git/commit
Bug 31223: Do not explode if plugins disabled
authorTomas Cohen Arazi <tomascohen@theke.io>
Tue, 26 Jul 2022 12:55:38 +0000 (09:55 -0300)
committerLucas Gass <lucas@bywatersolutions.com>
Mon, 12 Sep 2022 14:56:37 +0000 (14:56 +0000)
commite8405efbec4a7c186abbaa1f9b88cbc8dceda183
tree905a83c7188393e8189ddc5043dc3f1a5d66eb46
parentb34e91b50eadf9b3ec4ab993a462d0e3fbfa7113
Bug 31223: Do not explode if plugins disabled

This patch makes the code skip calculating the plugin-related task
codes => class mapping if plugins are entirely disbaled.

To test:
1. Apply the regression tests
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Plugins/BackgroundJob.t
=> FAIL: Tests explode with: Can't call method "GetPlugins" on an
undefined value at... Koha/BackgroundJob.pm line 424.
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass!
5. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7867106d430dd9ab3f673185945467931a10082e)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Koha/BackgroundJob.pm