diff --git a/application/controllers/components/stv/Config.php b/application/controllers/components/stv/Config.php index a9503f4e6..a0fd4f53a 100644 --- a/application/controllers/components/stv/Config.php +++ b/application/controllers/components/stv/Config.php @@ -28,7 +28,9 @@ class Config extends FHC_Controller 'component' => './Stv/Studentenverwaltung/Details/Notizen.js' ]; - Events::trigger('stv_conf_student', $result); + Events::trigger('stv_conf_student', function & () use (&$result) { + return $result; + }); $this->outputJsonSuccess($result); } diff --git a/application/core/CI3_Events.php b/application/core/CI3_Events.php index d2c687a75..33a96b89e 100644 --- a/application/core/CI3_Events.php +++ b/application/core/CI3_Events.php @@ -24,7 +24,7 @@ class CI3_Events self::$eventsSorted[$event] = false; } - public static function trigger($event, &...$args) + public static function trigger($event, ...$args) { if (!isset(self::$events[$event])) return; @@ -37,7 +37,7 @@ class CI3_Events } foreach (self::$events[$event] as $conf) { - call_user_func_array($conf[1], $args); + $conf[1](...$args); } } }