cvs: php-src(PHP_5_0) /pear/Console Getopt.php
| From: | Andrei Zmievski | Date: | Tue, 01 Mar 2005 18:20:26 +0000 |
| Subject: | cvs: php-src(PHP_5_0) /pear/Console Getopt.php | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-30671@lists.php.net to get a copy of this message | ||
andrei Tue Mar 1 13:20:26 2005 EDT
Modified files: (Branch: PHP_5_0)
/php-src/pear/Console Getopt.php
Log:
Allow = sign in long option argument.
Fixes PEAR bug #1831.
http://cvs.php.net/diff.php/php-src/pear/Console/Getopt.php?r1=1.28&r2=1.28.4.1&ty=u
Index: php-src/pear/Console/Getopt.php
diff -u php-src/pear/Console/Getopt.php:1.28 php-src/pear/Console/Getopt.php:1.28.4.1
--- php-src/pear/Console/Getopt.php:1.28 Thu Jan 8 12:33:10 2004
+++ php-src/pear/Console/Getopt.php Tue Mar 1 13:20:26 2005
@@ -16,7 +16,7 @@
// | Author: Andrei Zmievski <andrei@php.net> |
// +----------------------------------------------------------------------+
//
-// $Id: Getopt.php,v 1.28 2004/01/08 17:33:10 sniper Exp $
+// $Id: Getopt.php,v 1.28.4.1 2005/03/01 18:20:26 andrei Exp $
require_once 'PEAR.php';
@@ -184,7 +184,7 @@
*/
function _parseLongOption($arg, $long_options, &$opts, &$args)
{
- @list($opt, $opt_arg) = explode('=', $arg);
+ @list($opt, $opt_arg) = explode('=', $arg, 2);
$opt_len = strlen($opt);
for ($i = 0; $i < count($long_options); $i++) {