chg: [CLI] Convert "false" and "true" for setSettings to 0 and 1 respectively, fixes #3408

pull/3433/head
iglocska 2018-07-04 14:01:57 +02:00
parent 36ca1e002b
commit 948be561d5
1 changed files with 2 additions and 0 deletions

View File

@ -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 {