mirror of
https://github.com/Mibew/mibew.git
synced 2025-01-30 21:10:29 +03:00
Fix bug with failed initialization of plugins that does not need config at all
This commit is contained in:
parent
cf76dd744d
commit
1549125665
@ -53,6 +53,12 @@ function load_system_configs()
|
||||
$configs['cache'] = array();
|
||||
}
|
||||
|
||||
// Plugins section should exists too. The logic behind "empty" statement is
|
||||
// the same as above.
|
||||
if (empty($configs['plugins'])) {
|
||||
$configs['plugins'] = array();
|
||||
}
|
||||
|
||||
// Database section should exists too. Also it should have an appropriate structure.
|
||||
if (empty($configs['database'])) {
|
||||
$configs['database'] = array();
|
||||
|
@ -103,7 +103,7 @@ require_once(MIBEW_FS_ROOT . '/libs/track.php');
|
||||
require_once(MIBEW_FS_ROOT . '/libs/userinfo.php');
|
||||
|
||||
// Run plugins only after all libs are loaded.
|
||||
if (get_maintenance_mode() === false && !empty($configs['plugins'])) {
|
||||
if (get_maintenance_mode() === false) {
|
||||
// A list of plugins is defined in $plugins_list variable in
|
||||
// configs/config.yml
|
||||
\Mibew\Plugin\PluginManager::getInstance()->loadPlugins($configs['plugins']);
|
||||
|
Loading…
Reference in New Issue
Block a user