From: Tomas V.V.Cox Date: Mon, 30 Jun 2003 10:09:44 +0000 (+0000) Subject: Fix for http://bugs.php.net/bug.php?id=21994 X-Git-Tag: BEFORE_ARG_INFO~540 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1ca5fc5f0aa5f7a436deaf58e2c7a3464c485210;p=php Fix for http://bugs.php.net/bug.php?id=21994 --- diff --git a/pear/Console/Getopt.php b/pear/Console/Getopt.php index 1f98a1c083..9bc48c1480 100644 --- a/pear/Console/Getopt.php +++ b/pear/Console/Getopt.php @@ -183,7 +183,7 @@ class Console_Getopt { 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"); } }