From: Andrei Zmievski Date: Fri, 5 Dec 2003 21:57:01 +0000 (+0000) Subject: Remove erroneous array_shift(). The args passed to Getopt are supposed X-Git-Tag: php-4.3.5RC1~110 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=087326527ef25091fb6125d936da6896b08230a4;p=php Remove erroneous array_shift(). The args passed to Getopt are supposed to be without leading command name anyway. This has been the rule since the first release. --- diff --git a/pear/Console/Getopt.php b/pear/Console/Getopt.php index 9bc48c1480..133a5bf313 100644 --- a/pear/Console/Getopt.php +++ b/pear/Console/Getopt.php @@ -80,9 +80,7 @@ class Console_Getopt { if ($long_options) { sort($long_options); } - if (isset($args[0]{0}) && $args[0]{0} != '-') { - array_shift($args); - } + reset($args); while (list($i, $arg) = each($args)) {