From: Alan Knowles Date: Mon, 5 Aug 2002 10:37:40 +0000 (+0000) Subject: Fixed array_shift messing up array_slice.. X-Git-Tag: dev~21 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fd7e7021c7209eecffda07b95ad0c27ae3d6c701;p=php Fixed array_shift messing up array_slice.. --- diff --git a/pear/Console/Getopt.php b/pear/Console/Getopt.php index 964421943f..15fe9efe34 100644 --- a/pear/Console/Getopt.php +++ b/pear/Console/Getopt.php @@ -82,6 +82,7 @@ class Console_Getopt { } if (isset($args[0]{0}) && $args[0]{0} != '-') { array_shift($args); + $args = array_values($args); } reset($args); while (list($i, $arg) = each($args)) {