Skip to content

Commit

Permalink
Dev: Fixed Fatal error if a plugin are deleted
Browse files Browse the repository at this point in the history
  • Loading branch information
Shnoulle committed Jan 24, 2017
1 parent 7d77b4a commit 8307ad6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion application/libraries/PluginManager/PluginManager.php
Expand Up @@ -423,7 +423,9 @@ public function readConfigFiles()
{
$this->loadAllPlugins();
foreach ($this->plugins as $plugin) {
$plugin->readConfigFile();
if(is_object($plugin)){

This comment has been minimized.

Copy link
@olleharstedt

olleharstedt Jan 25, 2017

Contributor

No action if it's not an object?

This comment has been minimized.

Copy link
@Shnoulle

Shnoulle Jan 25, 2017

Author Collaborator

Seems action is done after . When admin go to plugin manager : see a warning 'XXXX don't exist and deleted'.
Only needed action is logging ?

I think : we must not deactivate a plugin without a clear Admin warning, and only when managing plugin seems OK.

This comment has been minimized.

Copy link
@olleharstedt

olleharstedt Jan 25, 2017

Contributor

OK. So maybe add

else {
  // Do nothing, plugin is deleted next time plugin manager is visited
}

Although strange that it is loaded at all.

This comment has been minimized.

Copy link
@Shnoulle

Shnoulle Jan 25, 2017

Author Collaborator

About loaded : i don't look of the function after, surely fixed in the first call (beofre) and this first call it's now the second one.

$plugin->readConfigFile();
}
}
$this->plugins = array();
$this->subscriptions = array();
Expand Down

0 comments on commit 8307ad6

Please sign in to comment.