cvs: pear-core /scripts pearcmd.php
| From: | Greg Beaver | Date: | Wed, 30 Nov 2005 07:18:26 +0000 |
| Subject: | cvs: pear-core /scripts pearcmd.php | ||
| Groups: | php.pear.cvs php.pear.core | ||
| Request: | Send a blank email to pear-cvs+get-36619@lists.php.net to get a copy of this message | ||
cellog Wed Nov 30 02:18:26 2005 EDT
Modified files:
/pear-core/scripts pearcmd.php
Log:
better fix for CGI-specific weirdity
this one allows users to pass in -- to pear
http://cvs.php.net/diff.php/pear-core/scripts/pearcmd.php?r1=1.30&r2=1.31&ty=u
Index: pear-core/scripts/pearcmd.php
diff -u pear-core/scripts/pearcmd.php:1.30 pear-core/scripts/pearcmd.php:1.31
--- pear-core/scripts/pearcmd.php:1.30 Wed Nov 30 00:48:02 2005
+++ pear-core/scripts/pearcmd.php Wed Nov 30 02:18:22 2005
@@ -18,7 +18,7 @@
// | |
// +----------------------------------------------------------------------+
//
-// $Id: pearcmd.php,v 1.30 2005/11/30 05:48:02 cellog Exp $
+// $Id: pearcmd.php,v 1.31 2005/11/30 07:18:22 cellog Exp $
ob_end_clean();
if (!defined('PEAR_RUNTYPE')) {
@@ -71,12 +71,9 @@
$all_commands = PEAR_Command::getCommands();
$argv = Console_Getopt::readPHPArgv();
-if (count($argv)) {
- for ($i = 0; $i < count($argv); $i++) {
- if ($argv[$i] == '--') {
- unset($argv[$i]);
- }
- }
+// fix CGI sapi oddity - the -- in pear.bat/pear is not removed
+if (php_sapi_name() != 'cli' && isset($argv[1]) && $argv[1] ==
'--') {
+ unset($argv[1]);
$argv = array_values($argv);
}
$progname = PEAR_RUNTYPE;