summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-11-14 15:51:37 -0500
committerFrederic Guillot <fred@kanboard.net>2015-11-14 15:51:37 -0500
commitd0925d99e78843ef3c633aac052880fc271ac299 (patch)
treec6ff33f81b40d2f963336f1ae001e4c7148fdc91 /app
parentd84bf429d6f9c622c2a120ab0180486ee92eb18e (diff)
Improve error handling of plugins
Diffstat (limited to 'app')
-rw-r--r--app/Core/Plugin/Loader.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/Core/Plugin/Loader.php b/app/Core/Plugin/Loader.php
index 4769e5cb..530d9b40 100644
--- a/app/Core/Plugin/Loader.php
+++ b/app/Core/Plugin/Loader.php
@@ -4,6 +4,7 @@ namespace Kanboard\Core\Plugin;
use DirectoryIterator;
use PDOException;
+use LogicException;
use RuntimeException;
use Kanboard\Core\Tool;
@@ -59,6 +60,11 @@ class Loader extends \Kanboard\Core\Base
public function load($plugin)
{
$class = '\Kanboard\Plugin\\'.$plugin.'\\Plugin';
+
+ if (! class_exists($class)) {
+ throw new LogicException('Unable to load this plugin class '.$class);
+ }
+
$instance = new $class($this->container);
Tool::buildDic($this->container, $instance->getClasses());