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 7252686 commit 61fff61
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG-DEV.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ HumHub Changelog
- Fix #6931: Fix visibility of private spaces in the user notification settings
- Enh #6757: Allow changing visibility of global content
- Fix #5419: Lock search index while reindexing
- Fix #5629: Better handling of legacy configuration file options for disabled non-core modules

1.16.0-beta.1 (April 5, 2024)
-----------------------------
Expand Down
5 changes: 5 additions & 0 deletions protected/humhub/components/ModuleManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,11 @@ public function register(string $basePath, ?array $config = null)
$isCoreModule = (isset($config['isCoreModule']) && $config['isCoreModule']);
$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']]);
return null;
}

$this->modules[$config['id']] = $config['class'];

if (isset($config['namespace'])) {
Expand Down

0 comments on commit 61fff61

Please sign in to comment.