-
Bug
-
Resolution: Fixed
-
Minor
-
3.9.7, 3.10.6, 3.11.2
-
MOODLE_310_STABLE, MOODLE_311_STABLE, MOODLE_39_STABLE
-
MOODLE_310_STABLE, MOODLE_311_STABLE
-
MDL-71778-master -
In the moodle cli cfg.php the filter to detect ,hard set only compare name of the cfg parameter to $CFG->config_php_settings content.
But when component is passed as command line argument it is not correct.
the component and name can be stored in $CFG->forced_plugin_settings content
Before patch
Launch moodle command client cfg
php /moodlepath/amdin/cli/cfg.php --component='logstore_database' --name=dbhost --set=localhost |
This will trigger the cli error message :
"The configuration variable is hard-set in the config.php, unable to change."
Whereas the parameter is not set in config.php
After Patch
After patching cfg.php, the previous command line will pass and localhost will be set for logstore database setting
The if you add the following entry into config.php :
$CFG->forced_plugin_settings['logstore_database']['dbhost']='localhost'; |
And relaunch moodle cli cfg
php /moodlepath/amdin/cli/cfg.php --component='logstore_database' --name=dbhost --set=localhost |
the cli error message will be triggered but this is normal since the plugin setting is set through $CFG->forced_plugin_settings variable