diff --git a/src/Config.php b/src/Config.php index 55c7598f2b..ee50bc79d9 100644 --- a/src/Config.php +++ b/src/Config.php @@ -1232,13 +1232,17 @@ public function processLongArgument($arg, $pos) if ($this->dieOnUnknownArg === false) { $eqPos = strpos($arg, '='); try { + $unknown = $this->unknown; + if ($eqPos === false) { - $this->values[$arg] = $arg; + $unknown[$arg] = $arg; } else { - $value = substr($arg, ($eqPos + 1)); - $arg = substr($arg, 0, $eqPos); - $this->values[$arg] = $value; + $value = substr($arg, ($eqPos + 1)); + $arg = substr($arg, 0, $eqPos); + $unknown[$arg] = $value; } + + $this->unknown = $unknown; } catch (RuntimeException $e) { // Value is not valid, so just ignore it. }