aboutsummaryrefslogtreecommitdiff
path: root/app/controllers/plugin_controller.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/plugin_controller.php')
-rw-r--r--app/controllers/plugin_controller.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/controllers/plugin_controller.php b/app/controllers/plugin_controller.php
index 7710bff..445f22e 100644
--- a/app/controllers/plugin_controller.php
+++ b/app/controllers/plugin_controller.php
@@ -14,8 +14,12 @@ class PluginController extends StudipController
{
parent::__construct($dispatcher);
+ if (!isset($dispatcher->current_plugin)) {
+ throw new Exception('Plugin missing for plugin controller!');
+ }
$this->plugin = $dispatcher->current_plugin;
+
if ($this->plugin && $this->plugin->hasTranslation()) {
// Localization
$this->_ = function ($string) {