From e9ada19fbbce660f633ddecd4f004cc823254ee4 Mon Sep 17 00:00:00 2001 From: Marina Glancy Date: Tue, 7 Jun 2016 08:58:59 +0800 Subject: [PATCH] MDL-54837 tags: allow to specify static function as callback --- tag/classes/tag.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tag/classes/tag.php b/tag/classes/tag.php index 26ee6905147..02d568bab71 100644 --- a/tag/classes/tag.php +++ b/tag/classes/tag.php @@ -1297,7 +1297,7 @@ class core_tag_tag { require_once($CFG->dirroot . '/' . ltrim($tagarea->callbackfile, '/')); } $callback = $tagarea->callback; - return $callback($this, $exclusivemode, $fromctx, $ctx, $rec, $page); + return call_user_func_array($callback, [$this, $exclusivemode, $fromctx, $ctx, $rec, $page]); } return null; }