Skip to content

Commit

Permalink
Merge pull request #18 from rlerdorf/patch-1
Browse files Browse the repository at this point in the history
Fix 2 bugs
  • Loading branch information
rvml authored Sep 25, 2017
2 parents 3bf1b90 + 86f30b4 commit 6a360e0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Util/PHPOptions/Options.php
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,8 @@ function _getopt_do_longs($opts, $opt, $longopts, $args) {
if ($i === False) {
$optarg = Null;
} else {
$opt = substr($opt,0,$i);
$optarg = substr($opt,$i+1);
$opt = substr($opt,0,$i);
}

list($has_arg, $opt) = _getopt_long_has_args($opt, $longopts);
Expand Down Expand Up @@ -514,7 +514,7 @@ public function parse($args) {
if (! is_array($opt[$k])) {
$opt[$k] = array($opt[$k], $val);
} else {
$opt[$k][] = $val;
$opt[$k] = array_merge($opt[$k],[$val]);
}
} else {
$opt[$k] = $val;
Expand Down

0 comments on commit 6a360e0

Please sign in to comment.