From 2b21164387aa3f8ad97eb9d8b1f272089483a6d1 Mon Sep 17 00:00:00 2001
From: Jan-Hendrik Willms <tleilax+github@gmail.com>
Date: Fri, 15 Jul 2022 10:39:02 +0200
Subject: [PATCH] fix PluginController, re #1328

---
 app/controllers/plugin_controller.php | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/app/controllers/plugin_controller.php b/app/controllers/plugin_controller.php
index c18874ed493..d57a90d6ceb 100644
--- a/app/controllers/plugin_controller.php
+++ b/app/controllers/plugin_controller.php
@@ -64,9 +64,8 @@ class PluginController extends StudipController
      */
     public function __call($method, $arguments)
     {
-        $variables = get_object_vars($this);
-        if (isset($variables[$method]) && is_callable($variables[$method])) {
-            return call_user_func_array($variables[$method], $arguments);
+        if (isset($this->_template_variables[$method]) && is_callable($this->_template_variables[$method])) {
+            return call_user_func_array($this->_template_variables[$method], $arguments);
         }
         return parent::__call($method, $arguments);
     }
-- 
GitLab