aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/inc/Extension
diff options
context:
space:
mode:
Diffstat (limited to 'inc/Extension')
-rw-r--r--inc/Extension/Event.php7
-rw-r--r--inc/Extension/SyntaxPlugin.php4
2 files changed, 3 insertions, 8 deletions
diff --git a/inc/Extension/Event.php b/inc/Extension/Event.php
index bbaa52e55..32f346c72 100644
--- a/inc/Extension/Event.php
+++ b/inc/Extension/Event.php
@@ -126,12 +126,7 @@ class Event
}
if ($this->advise_before($enablePrevent) && is_callable($action)) {
- if (is_array($action)) {
- list($obj, $method) = $action;
- $this->result = $obj->$method($this->data);
- } else {
- $this->result = $action($this->data);
- }
+ $this->result = call_user_func_array($action, [&$this->data]);
}
$this->advise_after();
diff --git a/inc/Extension/SyntaxPlugin.php b/inc/Extension/SyntaxPlugin.php
index e5dda9bdc..ea8f51b4d 100644
--- a/inc/Extension/SyntaxPlugin.php
+++ b/inc/Extension/SyntaxPlugin.php
@@ -2,8 +2,8 @@
namespace dokuwiki\Extension;
-use \Doku_Handler;
-use \Doku_Renderer;
+use Doku_Handler;
+use Doku_Renderer;
/**
* Syntax Plugin Prototype