diff options
author | mattab <matthieu.aubry@gmail.com> | 2013-12-19 08:06:57 +0400 |
---|---|---|
committer | mattab <matthieu.aubry@gmail.com> | 2013-12-19 08:06:57 +0400 |
commit | 3910272e8c2a2fa5d0ad5dab54365a0215c6eee7 (patch) | |
tree | d7512a7cdb9d15735009257761082307489de193 | |
parent | f666400c97be09f4173fd93087413891ab307e61 (diff) |
Refs #4373 The getAssets calls the dispatcher with a plugin that cannot be loaded. catching exception when trying to "uninstall" the plugin.
-rw-r--r-- | core/AssetManager.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/core/AssetManager.php b/core/AssetManager.php index 1104ed42d8..0041cc2529 100644 --- a/core/AssetManager.php +++ b/core/AssetManager.php @@ -339,7 +339,13 @@ class AssetManager extends Singleton { $fetcher = new JScriptUIAssetFetcher(array($pluginName), $this->theme); - $assets = $fetcher->getCatalog()->getAssets(); + try { + $assets = $fetcher->getCatalog()->getAssets(); + } catch(\Exception $e) { + // This can happen when a plugin is not valid (eg. Piwik 1.x format) + // When posting the event to the plugin, it returns an exception "Plugin has not been loaded" + return false; + } $plugin = Manager::getInstance()->getLoadedPlugin($pluginName); |