N°9618 - Be able to write comment in MyModuleSettings

N°9618 - Be able to write comment in MyModuleSettings
This commit is contained in:
odain
2026-05-19 23:56:21 +02:00
parent b29a3b5df8
commit 2ecd2d7a96
5 changed files with 152 additions and 4 deletions

View File

@@ -260,6 +260,11 @@ class ModuleFileReader
}
$aModuleConfig = $this->oPhpExpressionEvaluator->EvaluateExpression($oModuleConfigInfo->value);
if (isset($aModuleConfig['settings'])) {
$oPhpExpressionEvaluator = new PhpExpressionEvaluator();
$aArrayWithComments = $oPhpExpressionEvaluator->GetArrayWithComments($oModuleConfigInfo->value);
$aModuleConfig['settings'] = array_replace_recursive($aArrayWithComments['settings'], $aModuleConfig['settings']);
}
if (! is_array($aModuleConfig)) {
throw new ModuleFileReaderException("3rd parameter to SetupWebPage::AddModule not an array: ".get_class($oModuleConfigInfo->value), 0, null, $sModuleFilePath);