diff options
Diffstat (limited to 'app/Core/Plugin')
-rw-r--r-- | app/Core/Plugin/Base.php | 2 | ||||
-rw-r--r-- | app/Core/Plugin/Loader.php | 4 |
2 files changed, 2 insertions, 4 deletions
diff --git a/app/Core/Plugin/Base.php b/app/Core/Plugin/Base.php index e38ffee8..15265370 100644 --- a/app/Core/Plugin/Base.php +++ b/app/Core/Plugin/Base.php @@ -51,7 +51,7 @@ abstract class Base extends \Kanboard\Core\Base { $container = $this->container; - $this->container['dispatcher']->addListener($event, function() use ($container, $callback) { + $this->container['dispatcher']->addListener($event, function () use ($container, $callback) { call_user_func($callback, $container); }); } diff --git a/app/Core/Plugin/Loader.php b/app/Core/Plugin/Loader.php index ea512c4e..e68ba8e6 100644 --- a/app/Core/Plugin/Loader.php +++ b/app/Core/Plugin/Loader.php @@ -94,7 +94,6 @@ class Loader extends \Kanboard\Core\Base $current_version = $this->getSchemaVersion($plugin); try { - $this->db->startTransaction(); $this->db->getDriver()->disableForeignKeys(); @@ -109,8 +108,7 @@ class Loader extends \Kanboard\Core\Base $this->db->getDriver()->enableForeignKeys(); $this->db->closeTransaction(); $this->setSchemaVersion($plugin, $i - 1); - } - catch (PDOException $e) { + } catch (PDOException $e) { $this->db->cancelTransaction(); $this->db->getDriver()->enableForeignKeys(); die('Unable to migrate schema for the plugin: '.$plugin.' => '.$e->getMessage()); |