]> granicus.if.org Git - php/commitdiff
Remove erroneous array_shift(). The args passed to Getopt are supposed
authorAndrei Zmievski <andrei@php.net>
Fri, 5 Dec 2003 21:57:01 +0000 (21:57 +0000)
committerAndrei Zmievski <andrei@php.net>
Fri, 5 Dec 2003 21:57:01 +0000 (21:57 +0000)
to be without leading command name anyway. This has been the rule since
the first release.

pear/Console/Getopt.php

index 9bc48c14801d5c27209cc4115fb394f5f259543b..133a5bf3134ea213ba9a110fc7a319dc08aadb8a 100644 (file)
@@ -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)) {