]> granicus.if.org Git - php/commitdiff
Added check for $argv avaible
authorTomas V.V.Cox <cox@php.net>
Sat, 5 Jan 2002 17:20:08 +0000 (17:20 +0000)
committerTomas V.V.Cox <cox@php.net>
Sat, 5 Jan 2002 17:20:08 +0000 (17:20 +0000)
(thanks Michael Härtl <mhaertl@pressline.de>)

pear/scripts/pear-get.in
pear/scripts/pear.in

index 7e6ca9fa3d35fefce50c4e9c49931dc461c6491e..8d349376e1905caddb6048e27a63eb36efe64df8 100644 (file)
@@ -49,7 +49,9 @@ error_reporting(E_ALL & ~E_NOTICE);
 PEAR::setErrorHandling(PEAR_ERROR_PRINT, "pear: %s\n");
 
 // {{{ config file and option parsing
-
+if (!isset($argv)) {
+    die("Could not read cmd args (register_argc_argv=Off?)\n");
+}
 $options = Console_Getopt::getopt($argv, "c:C:d:D:h?qu:v");
 if (PEAR::isError($options)) {
     usage($options);
index 40c818a860675a91b216c9e0cd463ea209783bc1..e093709efd249704bde5e0b3a6262f5c2ea43059 100644 (file)
@@ -52,7 +52,9 @@ error_reporting(E_ALL & ~E_NOTICE);
 PEAR::setErrorHandling(PEAR_ERROR_PRINT, "pear: %s\n");
 
 // {{{ config file and option parsing
-
+if (!isset($argv)) {
+    die("Could not read cmd args (register_argc_argv=Off?)\n");
+}
 $options = Console_Getopt::getopt($argv, "c:C:d:D:h?sSqu:v");
 if (PEAR::isError($options)) {
     usage($options);
@@ -338,10 +340,10 @@ switch ($command) {
 
     case 'upload-release': {
         if (sizeof($cmdargs) < 1) {
-            
+
         }
         $tarball = $cmdargs[0];
-        
+
     }
 
     // }}}