Re: Console/Getopt.php workaround

From: Date: Wed, 11 Dec 2002 14:19:41 +0000
Subject: Re: Console/Getopt.php workaround
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-11555@lists.php.net to get a copy of this message
What about "!empty()"? Does that work? Zitat von Brad Bulger <tater@potatoe.com>: > > dunno if you'll really want to apply this or not, since i'm pretty sure > the problem is a bug - in ZE2, isset($string{$offset}) always returns > false. the last time i submitted a fix for some odd ZE2 behavior, they > ended up taking it out altogether... (the class/global function > scope thing) > > but in case someone is thinking about fiddling with this anyway: > > Index: Getopt.php > =================================================================== > RCS file: /repository/php4/pear/Console/Getopt.php,v > retrieving revision 1.21 > diff -u -r1.21 Getopt.php > --- Getopt.php 5 Aug 2002 12:58:38 -0000 1.21 > +++ Getopt.php 11 Dec 2002 12:24:07 -0000 > @@ -80,7 +80,7 @@ > if ($long_options) { > sort($long_options); > } > - if (isset($args[0]{0}) && $args[0]{0} != '-') { > + if (substr($args[0],0,1) != '-') { > array_shift($args); > } > reset($args); > > -- > PEAR Development Mailing List (http://pear.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > Jan. -- http://www.horde.org - The Horde Project http://www.ammma.de - discover your knowledge http://www.tip4all.de - Deine private Tippgemeinschaft

« previous php.pear.dev (#11555) next »