cox Mon Jun 30 06:09:44 2003 EDT
Modified files:
/php-src/pear/Console Getopt.php
Log:
Fix for http://bugs.php.net/bug.php?id=21994
Index: php-src/pear/Console/Getopt.php
diff -u php-src/pear/Console/Getopt.php:1.23 php-src/pear/Console/Getopt.php:1.24
--- php-src/pear/Console/Getopt.php:1.23 Tue Jun 10 16:03:43 2003
+++ php-src/pear/Console/Getopt.php Mon Jun 30 06:09:44 2003
@@no-spam -16,7 +16,7 @@no-spam
// | Author: Andrei Zmievski <andrei@no-spam> |
// +----------------------------------------------------------------------+
//
-// $Id: Getopt.php,v 1.23 2003/06/10 20:03:43 imajes Exp $
+// $Id: Getopt.php,v 1.24 2003/06/30 10:09:44 cox Exp $
require_once 'PEAR.php';
@@no-spam -183,7 +183,7 @@no-spam
if (substr($long_opt, -2) != '==') {
/* Long option requires an argument.
Take the next argument if one wasn't specified. */;
- if (!$opt_arg && !(list(, $opt_arg) = each($args))) {
+ if (!strlen($opt_arg) && !(list(, $opt_arg) = each($args))) {
return PEAR::raiseError("Console_Getopt: option --$opt requires an argument");
}
}
On Mon, 30 Jun 2003 13:43:01 +0300 (EEST)
Jani Taskinen <sniper@no-spam> wrote:
>
> MFH?! (same for those install fixes..)
I'll MFH everything once. There are still pending commits and this is a
*real* pain to sync everything 10 times per day ;-).
But that will be done :)
pierre
On Mon, 30 Jun 2003, Pierre-Alain Joye wrote:
>On Mon, 30 Jun 2003 13:43:01 +0300 (EEST)
>Jani Taskinen <sniper@no-spam> wrote:
>
>>
>> MFH?! (same for those install fixes..)
>
>I'll MFH everything once. There are still pending commits and this is a
>*real* pain to sync everything 10 times per day ;-).
>
>But that will be done :)
Well, I can't test the changes on PHP_4_3 branch unless you MFH them, can I?
It maybe 'pain' to sync them but you still should do it always after you
commit to HEAD, otherwise there's big chance that you forget about it.
That's why I tend to remind people to MFH..
I do this: I have two checkouts, one for PHP_4_3 and one for PHP5.
If I change something in PHP5, I first make a patch:
php5# cvs diff > /tmp/patch
Then I commit:
php5# cvs commit -m 'Fixed foobar'
Then I apply the patch to the other branch and commit:
php5# cd ../php4_3
php4_3# patch -p0 < /tmp/patch
php4_3# cvs commit -m 'MFH: Fixed foobar'
Not very painful. (there's a way to do it using CVS commands too, but I've found
them to be a bit flaky, or I never learned how to do it right :)
This has worked fine and after you've done it couple of hundred times,
you get used to it. :)
--Jani
On Tue, 1 Jul 2003, Jon Parise wrote:
>On Mon, Jun 30, 2003 at 04:01:49PM +0300, Jani Taskinen wrote:
>
>> >> MFH?! (same for those install fixes..)
>> >
>> >I'll MFH everything once. There are still pending commits and this is a
>> >*real* pain to sync everything 10 times per day ;-).
>>
>> Well, I can't test the changes on PHP_4_3 branch unless you MFH them, can I?
>> It maybe 'pain' to sync them but you still should do it always after you
>> commit to HEAD, otherwise there's big chance that you forget about it.
>> That's why I tend to remind people to MFH..
>
>The counter argument is that fresh changes should "breath" a little
>bit in HEAD before being backported into a stable branch. That would
>prevent additional commits made to correct typos / oversights / etc.
>from having to be made to the stable branch, as well.
Whatver. I just wanted to test but if that's not okay, forget about it.
--Jani