Console/Getopt.php workaround

From: Date: Wed, 11 Dec 2002 12:33:56 +0000
Subject: Console/Getopt.php workaround
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-11554@lists.php.net to get a copy of this message
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);

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