mirror of
https://github.com/Mibew/mibew.git
synced 2025-02-07 08:14:42 +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();
|
$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.
|
// Database section should exists too. Also it should have an appropriate structure.
|
||||||
if (empty($configs['database'])) {
|
if (empty($configs['database'])) {
|
||||||
$configs['database'] = array();
|
$configs['database'] = array();
|
||||||
|
@ -103,7 +103,7 @@ require_once(MIBEW_FS_ROOT . '/libs/track.php');
|
|||||||
require_once(MIBEW_FS_ROOT . '/libs/userinfo.php');
|
require_once(MIBEW_FS_ROOT . '/libs/userinfo.php');
|
||||||
|
|
||||||
// Run plugins only after all libs are loaded.
|
// 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
|
// A list of plugins is defined in $plugins_list variable in
|
||||||
// configs/config.yml
|
// configs/config.yml
|
||||||
\Mibew\Plugin\PluginManager::getInstance()->loadPlugins($configs['plugins']);
|
\Mibew\Plugin\PluginManager::getInstance()->loadPlugins($configs['plugins']);
|
||||||
|
Loading…
Reference in New Issue
Block a user