mirror of
https://github.com/flextype/flextype.git
synced 2025-08-09 06:36:52 +02:00
fix(plugins): fix Plugins API issue with non valid plugins #555
This commit is contained in:
@@ -355,8 +355,13 @@ class Plugins
|
||||
|
||||
if (filesystem()->directory(PATH['project'] . '/plugins/')->exists()) {
|
||||
foreach (filesystem()->find()->in(PATH['project'] . '/plugins/')->directories()->depth(0) as $plugin) {
|
||||
$pluginsList[$plugin->getBasename()]['dirname'] = $plugin->getBasename();
|
||||
$pluginsList[$plugin->getBasename()]['pathname'] = $plugin->getPathname();
|
||||
$pluginName = $plugin->getBasename();
|
||||
if (filesystem()->file(PATH['project'] . '/plugins/' . $pluginName . '/plugin.php')->exists() &&
|
||||
filesystem()->file(PATH['project'] . '/plugins/' . $pluginName . '/plugin.yaml')->exists() &&
|
||||
filesystem()->file(PATH['project'] . '/plugins/' . $pluginName . '/settings.yaml')->exists()) {
|
||||
$pluginsList[$pluginName]['dirname'] = $plugin->getBasename();
|
||||
$pluginsList[$pluginName]['pathname'] = $plugin->getPathname();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user