summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--inc/events.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/inc/events.php b/inc/events.php
index 7f9824f60..318a7617e 100644
--- a/inc/events.php
+++ b/inc/events.php
@@ -93,7 +93,12 @@ class Doku_Event {
*/
function trigger($action=null, $enablePrevent=true) {
- if (!is_callable($action)) $enablePrevent = false;
+ if (!is_callable($action)) {
+ $enablePrevent = false;
+ if (!is_null($action)) {
+ trigger_error('The default action of '.$this.' is not null but also not callable. Maybe the method is not public?', E_USER_WARNING);
+ }
+ }
if ($this->advise_before($enablePrevent) && is_callable($action)) {
if (is_array($action)) {