X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=bin%2Fcli.class.php;h=3d719ea6fd50bf9bc030d040899ba0581c7b15de;hb=d2302f91322946564de5bb6021d4b3c8ce46128b;hp=8cdcc9e8e7c101e1b0fe151881a0b3e7ebaf2f01;hpb=e345d7fca665c1d1964721043e62a4b61b3205b2;p=civicrm-core.git diff --git a/bin/cli.class.php b/bin/cli.class.php index 8cdcc9e8e7..3d719ea6fd 100644 --- a/bin/cli.class.php +++ b/bin/cli.class.php @@ -211,7 +211,7 @@ class civicrm_cli { } // all other arguments are parameters $key = ltrim($arg, '--'); - $this->_params[$key] = isset($value) ? $value : NULL; + $this->_params[$key] = $value ?? NULL; } } return TRUE; @@ -294,8 +294,7 @@ class civicrm_cli { * @return bool */ private function _validateOptions() { - $required = $this->_required_arguments; - while (list(, $var) = each($required)) { + foreach ($this->_required_arguments as $var) { $index = '_' . $var; if (empty($this->$index)) { $missing_arg = '--' . $var;