mirror of
https://github.com/flextype/flextype.git
synced 2025-08-08 14:16:46 +02:00
feat(plugins): fix issue with non exists plugins folder
This commit is contained in:
@@ -350,9 +350,12 @@ class Plugins
|
||||
{
|
||||
// Get Plugins List
|
||||
$plugins_list = [];
|
||||
foreach (flextype('filesystem')->find()->in(PATH['project'] . '/plugins/')->directories()->depth(0) as $plugin) {
|
||||
$plugins_list[$plugin->getBasename()]['dirname'] = $plugin->getBasename();
|
||||
$plugins_list[$plugin->getBasename()]['pathname'] = $plugin->getPathname();
|
||||
|
||||
if (flextype('filesystem')->directory(PATH['project'] . '/plugins/')->exists()) {
|
||||
foreach (flextype('filesystem')->find()->in(PATH['project'] . '/plugins/')->directories()->depth(0) as $plugin) {
|
||||
$plugins_list[$plugin->getBasename()]['dirname'] = $plugin->getBasename();
|
||||
$plugins_list[$plugin->getBasename()]['pathname'] = $plugin->getPathname();
|
||||
}
|
||||
}
|
||||
|
||||
return $plugins_list;
|
||||
|
Reference in New Issue
Block a user