From 5eea8acd9bbe6603b5632be9081a588c12541dcf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20R=C3=BCegg?= Date: Sat, 25 Mar 2023 13:44:49 +0100 Subject: [PATCH] Fix error when no modules set https://docs.humhub.org/docs/admin/requirements lists php 7.4 as minimum requirement. Hence, the array properties should actually be arrays. This caused log targets to be disabled due to the `ModuleManager::getModules()` throwing an error when `ModuleManager::$modules` would be null. --- CHANGELOG.md | 1 + protected/humhub/components/ModuleManager.php | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e2afea9b46..eb6f6aea5f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ HumHub Changelog 1.13.2 (Unreleased) ------------------------- +- Fix #6195: Fix ModuleManager disabling logging when now modules set - Fix #5965: Suppress log warning 'Invalid session auth key attempted for user' - Fix #6084: Automatic LDAP user registration broken when not all req. attributes provided - Fix #6104: Fix update user with not existing group diff --git a/protected/humhub/components/ModuleManager.php b/protected/humhub/components/ModuleManager.php index 4657477d91..5174fe2e71 100644 --- a/protected/humhub/components/ModuleManager.php +++ b/protected/humhub/components/ModuleManager.php @@ -70,9 +70,9 @@ class ModuleManager extends Component * List of all modules * This also contains installed but not enabled modules. * - * @param array $config moduleId-class pairs + * @param array $modules moduleId-class pairs */ - protected $modules; + protected $modules = []; /** * List of all enabled module ids