Skip to content

Commit

Permalink
Fix #5629: Better handling of legacy configuration file options for d…
Browse files Browse the repository at this point in the history
…isabled non-core modules
  • Loading branch information
marc-farre committed Apr 9, 2024
1 parent 61fff61 commit 99553ed
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion protected/humhub/components/ModuleManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,9 @@ public function register(string $basePath, ?array $config = null)
$isInstallerModule = (isset($config['isInstallerModule']) && $config['isInstallerModule']);

if (!$isCoreModule && !$isInstallerModule && !in_array($config['id'], $this->enabledModules, true)) {
Yii::error('The module {moduleId} is present in the HumHub configuration file even though this module is disabled. Please remove it from the configuration.', ['moduleId' => $config['id']]);
$errorMessage = Yii::t('error', 'The module {moduleId} is present in the HumHub configuration file even though this module is disabled. Please remove it from the configuration.', ['moduleId' => '"' . $config['id'] . '"']);
Yii::error($errorMessage);
Yii::$app->view?->error($errorMessage);
return null;
}

Expand Down

0 comments on commit 99553ed

Please sign in to comment.