Browse Source

convertir aussi le 'true' en true

master
Cerdic 2 months ago
parent
commit
b9ce8844fe
  1. 9
      spip-cli/MailsubscriberSubscribe.php

9
spip-cli/MailsubscriberSubscribe.php

@ -81,8 +81,13 @@ class MailsubscriberSubscribe extends Command {
$options = array();
foreach (array('nom', 'lang', 'force', 'graceful', 'notify') as $o) {
if (!is_null($value= $input->getOption($o))) {
if (in_array($o, ['force', 'graceful', 'notify']) and $value === 'false') {
$value = false;
if (in_array($o, ['force', 'graceful', 'notify'])) {
if ($value === 'false') {
$value = false;
}
if ($value === 'true') {
$value = true;
}
}
$options[$o] = $value;
}

Loading…
Cancel
Save