[Koha-bugs] [Bug 24031] Add plugin hook after_hold_create

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Mar 6 12:24:20 CET 2020


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24031

Marcel de Rooy <m.de.rooy at rijksmuseum.nl> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |m.de.rooy at rijksmuseum.nl

--- Comment #7 from Marcel de Rooy <m.de.rooy at rijksmuseum.nl> ---
if (C4::Context->preference('UseKohaPlugins') &&
C4::Context->config('enable_plugins')) {
+        my @plugins = $class->new({ enable_plugins => 1 })->GetPlugins({
method => $method });
+        my @responses;
+        foreach my $plugin (@plugins) {
+            my $response = $plugin->$method(@args);
+            push @responses, $response;
+        }
+
+        return @responses;
+    }

No error checking?
What if one of the plugins fails, should you continue? Should you use eval?
Should $method be checked somehow before calling it rightaway?

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list