From: Tomas V.V.Cox Date: Sat, 5 Jan 2002 17:20:08 +0000 (+0000) Subject: Added check for $argv avaible X-Git-Tag: PRE_ISSET_PATCH~282 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7f98b04296b917edd578e3901666cd11b4824594;p=php Added check for $argv avaible (thanks Michael Härtl ) --- diff --git a/pear/scripts/pear-get.in b/pear/scripts/pear-get.in index 7e6ca9fa3d..8d349376e1 100644 --- a/pear/scripts/pear-get.in +++ b/pear/scripts/pear-get.in @@ -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); diff --git a/pear/scripts/pear.in b/pear/scripts/pear.in index 40c818a860..e093709efd 100644 --- a/pear/scripts/pear.in +++ b/pear/scripts/pear.in @@ -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]; - + } // }}}