mirror of https://github.com/MISP/MISP
chg: [CLI] Convert "false" and "true" for setSettings to 0 and 1 respectively, fixes #3408
parent
36ca1e002b
commit
948be561d5
|
@ -78,6 +78,8 @@ class AdminShell extends AppShell
|
|||
public function setSetting() {
|
||||
$setting = !isset($this->args[0]) ? null : $this->args[0];
|
||||
$value = !isset($this->args[1]) ? null : $this->args[1];
|
||||
if ($value === 'false') $value = 0;
|
||||
if ($value === 'true') $value = 1;
|
||||
if (empty($setting) || $value === null) {
|
||||
echo 'Invalid parameters. Usage: ' . APP . 'Console/cake Admin setSetting [setting_name] [setting_value]';
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue