From: Tomas V.V.Cox Date: Sun, 12 May 2002 16:42:50 +0000 (+0000) Subject: The command name is now the first arg not the second X-Git-Tag: php-4.3.0dev-ZendEngine2-Preview1~83 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=94a365964244248615432364926f6d7c9280d43b;p=php The command name is now the first arg not the second --- diff --git a/pear/scripts/pear.in b/pear/scripts/pear.in index edcbc8900d..f1d7a4e558 100644 --- a/pear/scripts/pear.in +++ b/pear/scripts/pear.in @@ -116,7 +116,7 @@ if ($store_user_config) { $config->store('user'); } -$command = (isset($options[1][1])) ? $options[1][1] : null; +$command = (isset($options[1][0])) ? $options[1][0] : null; if (empty($command) && ($store_user_config || $store_system_config)) { exit; @@ -128,13 +128,13 @@ if ($fetype == 'Gtk') { if (empty($all_commands[$command]) || $command == 'help') { usage(null, @$options[1][2]); } - + $cmd = PEAR_Command::factory($command, $config); if (PEAR::isError($cmd)) { die($cmd->getMessage()); } - - $cmdargs = array_slice($options[1], 2); + + $cmdargs = array_slice($options[1], 1); $ok = $cmd->run($command, $cmdopts, $cmdargs); if ($ok === false) { PEAR::raiseError("unknown command `$command'");