Commit 8e560df4 authored by Nigel McNie's avatar Nigel McNie Committed by Nigel McNie
Browse files

Make sure that the plugin file is available before trying to handle

the event.
parent 11b4ff33
......@@ -656,6 +656,7 @@ function handle_event($event, $data) {
foreach ($plugintypes as $name) {
if ($subs = get_records_array($name . '_event_subscription', 'event', $event)) {
foreach ($subs as $sub) {
safe_require($name, $sub->plugin);
$classname = 'Plugin' . ucfirst($name) . ucfirst($sub->plugin);
try {
call_static_method($classname, $sub->callfunction, $event, $data);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment