cvs: php-src(PHP_4_3) /pear/Console Getopt.php
| From: | Andrei Zmievski | Date: | Tue, 01 Mar 2005 18:19:48 +0000 |
| Subject: | cvs: php-src(PHP_4_3) /pear/Console Getopt.php | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-30670@lists.php.net to get a copy of this message | ||
andrei Tue Mar 1 13:19:48 2005 EDT
Modified files: (Branch: PHP_4_3)
/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.21.4.8&r2=1.21.4.9&ty=u
Index: php-src/pear/Console/Getopt.php
diff -u php-src/pear/Console/Getopt.php:1.21.4.8 php-src/pear/Console/Getopt.php:1.21.4.9
--- php-src/pear/Console/Getopt.php:1.21.4.8 Thu Dec 11 14:28:25 2003
+++ php-src/pear/Console/Getopt.php Tue Mar 1 13:19:48 2005
@@ -16,7 +16,7 @@
// | Author: Andrei Zmievski <andrei@php.net> |
// +----------------------------------------------------------------------+
//
-// $Id: Getopt.php,v 1.21.4.8 2003/12/11 19:28:25 andrei Exp $
+// $Id: Getopt.php,v 1.21.4.9 2005/03/01 18:19:48 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++) {