From: Tomas V.V.Cox Date: Sun, 26 May 2002 17:37:52 +0000 (+0000) Subject: "Help" fixes X-Git-Tag: NEW_UI_API_BP~46 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f2f69974e9f6c6ff22063af8f74106bb8c08d910;p=php "Help" fixes --- diff --git a/pear/PEAR/Command/Install.php b/pear/PEAR/Command/Install.php index c9576cea84..a2a1fc4373 100644 --- a/pear/PEAR/Command/Install.php +++ b/pear/PEAR/Command/Install.php @@ -148,6 +148,9 @@ specified at once. function doInstall($command, $options, $params) { + if (sizeof($params) < 1) { + return $this->raiseError('Missing package to install. Try "help install"'); + } if (empty($this->installer)) { $this->installer = &new PEAR_Installer($ui); } diff --git a/pear/scripts/pear.in b/pear/scripts/pear.in index 509c741317..eb3dc32092 100644 --- a/pear/scripts/pear.in +++ b/pear/scripts/pear.in @@ -133,7 +133,7 @@ if ($fetype == 'Gtk') { Gtk::main(); } else do { if ($command == 'help') { - usage(null, @$options[1][0]); + usage(null, @$options[1][1]); } PEAR::pushErrorHandling(PEAR_ERROR_RETURN);