From 8f101009fe9287b72cae85fa52c1942d24cdb8eb Mon Sep 17 00:00:00 2001 From: TeNNoX Date: Thu, 29 Jan 2015 20:22:22 +0100 Subject: [PATCH] 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 --- bin/cli.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.25.1