]> granicus.if.org Git - php/commitdiff
* Console_Getopt POSIX fix
authorStig Bakken <ssb@php.net>
Sun, 26 May 2002 12:51:10 +0000 (12:51 +0000)
committerStig Bakken <ssb@php.net>
Sun, 26 May 2002 12:51:10 +0000 (12:51 +0000)
pear/scripts/pear.in

index 6a374f1f30fd7108bb8fcea12344185e546798e1..509c741317a5923b4457fa3c6704d413f2039190 100644 (file)
@@ -21,6 +21,9 @@
 //
 // $Id$
 
+/**
+ * @nodep Gtk
+ */
 ini_set('allow_url_fopen', true);
 set_time_limit(0);
 ob_implicit_flush(true);
@@ -36,7 +39,7 @@ PEAR_Command::setFrontendType('CLI');
 $all_commands = PEAR_Command::getCommands();
 
 $argv = Console_Getopt::readPHPArgv();
-$progname = basename(array_shift($argv));
+$progname = basename($argv[0]);
 $options = Console_Getopt::getopt($argv, "c:C:d:D:Gh?sSqu:v");
 if (PEAR::isError($options)) {
     usage($options);
@@ -120,7 +123,7 @@ if ($store_user_config) {
     $config->store('user');
 }
 
-$command = (isset($options[1][0])) ? array_shift($options[1]) : null;
+$command = (isset($options[1][0])) ? $options[1][0] : null;
 
 if (empty($command) && ($store_user_config || $store_system_config)) {
     exit;