]> granicus.if.org Git - php/commitdiff
"Help" fixes
authorTomas V.V.Cox <cox@php.net>
Sun, 26 May 2002 17:37:52 +0000 (17:37 +0000)
committerTomas V.V.Cox <cox@php.net>
Sun, 26 May 2002 17:37:52 +0000 (17:37 +0000)
pear/PEAR/Command/Install.php
pear/scripts/pear.in

index c9576cea84cc7416f01a23e25ab5f074616cf9b3..a2a1fc4373c4d1fbff34b762f20ff9e6a9ef993f 100644 (file)
@@ -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);
         }
index 509c741317a5923b4457fa3c6704d413f2039190..eb3dc320929a799c76af5582ba9215602b1a3348 100644 (file)
@@ -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);