From: Stig Bakken Date: Sun, 26 May 2002 12:51:10 +0000 (+0000) Subject: * Console_Getopt POSIX fix X-Git-Tag: RELEASE_0_10~6 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f1882b9fc5c3af08fe2d91c2509027b121a50985;p=php * Console_Getopt POSIX fix --- diff --git a/pear/scripts/pear.in b/pear/scripts/pear.in index 6a374f1f30..509c741317 100644 --- a/pear/scripts/pear.in +++ b/pear/scripts/pear.in @@ -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;