From: TeNNoX Date: Thu, 29 Jan 2015 19:22:22 +0000 (+0100) Subject: Fixed weird while-each-loop. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=8f101009fe9287b72cae85fa52c1942d24cdb8eb;p=civicrm-core.git Fixed weird while-each-loop. -> This caused errors, when more than one unknown argument was given (as it is 'wrong' PHP code for this type of action) Example: http://sandbox.onlinephpfunctions.com/code/370c6dcc3bdc536819d52459ffd0343e699f77b2 --- diff --git a/bin/cli.class.php b/bin/cli.class.php index 10bb27db0d..3bb795153f 100644 --- a/bin/cli.class.php +++ b/bin/cli.class.php @@ -174,7 +174,7 @@ class civicrm_cli { $this->_joblog = TRUE; } else { - while (list($short, $long) = each($this->_additional_arguments)) { + foreach($this->_additional_arguments as $short => $long) { if ($arg == '-' . $short || $arg == '--' . $long) { $property = '_' . $long; $this->$property = $value;